-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathatom.xml
More file actions
executable file
·387 lines (280 loc) · 22.1 KB
/
atom.xml
File metadata and controls
executable file
·387 lines (280 loc) · 22.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title><![CDATA[Dmitriy Savchenko]]></title>
<link href="http://loginwashere.github.com/atom.xml" rel="self"/>
<link href="http://loginwashere.github.com/"/>
<updated>2015-02-23T21:53:32+00:00</updated>
<id>http://loginwashere.github.com/</id>
<author>
<name><![CDATA[Dmitriy Savchenko]]></name>
</author>
<generator uri="http://octopress.org/">Octopress</generator>
<entry>
<title type="html"><![CDATA[To LXC and beyond]]></title>
<link href="http://loginwashere.github.com/blog/2015/02/23/to-lxc-and-beyond/"/>
<updated>2015-02-23T20:05:00+00:00</updated>
<id>http://loginwashere.github.com/blog/2015/02/23/to-lxc-and-beyond</id>
<content type="html"><![CDATA[<p><img src="http://i.imgur.com/g8wJ1ol.jpg" title="containers" ></p>
<p>It’s been a while since I’ve started using virtualization.</p>
<p>At first it was VirtualBox vms, then I discovered Vagrant and about half a year ago
I’ve noticed LXC and weirdly before that about Docker.</p>
<p>One may ask - why do you need such things and I try to answer.</p>
<p>When I found out about VirtualBox I used computer with Windows7 at work and at home.
Being PHP developer at that days meant that you mostly work with LAMP stack on server
and with some HTML + CSS + Javascript on client. As you can see I had Linux server and
development environment was set up on Windows machine.</p>
<p>It was ok most of the time, but this inconsistency had stub me in the back several times.
Then when I once again had fixed some weird bug I decided to start using Linux instead of Windows
on my development machine. And before installing Linux as second os I wanted to try some Linux distribution
without installing it and screwing all up, so I used VirtualBox for this.</p>
<p>Long term short I was using Ubuntu as my main os for development. Project after project tim goes by and
I started to notice some weird thing - after switching to new project some soft kept running in background
and number of processes in htop kept growing. Yeah, you may say - stop that process, remove it from upstart,
remove it from system or something else, but sometimes these projects may return to life and you would be
fixing bugs on them and you would need them kept in ready to go state pretty mach all the time.</p>
<p>This is when I returned to VirtualBox again. This time I installed Ubuntu Server on it and connected to the box
over ssh. I was able to install software I need without adding it to host machine, then I could stop and start the box
at any time - it was quite amazing. At that time I event wanted to buy bigger usb flash drive to bring my vm with me
from work to home and vise versa.</p>
<p>This approach worked fine for a while, but it had some flaws. You could stop and start vm but if you destroy it
you are screwed - you need to remember what you did to vm to make your soft work and you need to reapply these changes.
This can be some sort of a shell script with installation commands or something more complicated. This same script also
can be useful to your team members - they will setup theirs development environments just like you did. Also besides
software installations VirtualBox has many setting and options you need to setup every time by hand
or using not os friendly api. Having these problems I’ve started looking fo solution and after a while I’ve found one.
It was Vagrant.</p>
<p>Vagrant allows you to specify VirtualBox vm settings in Vagrantfile and also you can specify some provision for your box.
It can be simple shell script or maybe puppet manifetsts and modules or other provision tool. This way you need to setup
Vagrant and VirtualBox on you host machine and then all other soft will be installed inside vm using scripts stored
alongside your project files and therefore under version control. This way you won’t forget your dev setup and it won’t be lost.
Your team mates will be able to setup same development environment from scratch in minutes.</p>
<p>But as any super power this one comes with some downside. VirtualBox vm is resource consuming. You won’t be able to run
Vagrant vm box in production and you can run only several of them on your development environment. Another common problem
is files haring between host and guest machines or synced folders. If you have large project syncing process may slow you down
and ide will destroy your nerves by even slower reindex (yes, I’m talking about you Php or WebStorm).</p>
<p>And it was exactly the time I’ve heard about LXC - Linux Containers. They are less heavy than VirtualBox vms and in general
provide same functionality. You can create container from a template, connect to it and work inside like in vm.
One new feature that can be done with containers is running everything inside it. And by everything I mean everything.
App soft, git, ide. Yeah, right - ide. I know, I know it sounds weird, but it works. Also running everything
app related in one place means disk operations are much faster, for example your ide will reindex project faster,
changes to project will be applied fasted and in two ways.</p>
<p>Event If you feel sceptical about it you can try it out and then decide what to do next. Maybe you like it maybe not.</p>
<p>And some words about Docker. Docker can be compared to LXC but they decided to dot it other way. Docker container
is intended to run one app. For example if you have LAMP stack - all letters will be in separate containers. It is intended behavior.
You can run several apps in one container using something like supervisor. Also Docker provide way to specify your
container contents with Dockerfile and you can commit and push containers to repositories.</p>
<p>Thanks to <a href="https://github.com/Mak-Di">Mak-Di</a> and <a href="https://github.com/makarova">Vi</a> for pointing out to LXC and initial help.</p>
<p>Useful links:</p>
<ol>
<li><a href="https://www.virtualbox.org/">VirtualBox</a></li>
<li><a href="https://www.vagrantup.com/">Vagrant</a></li>
<li><a href="https://linuxcontainers.org/">Linux Containers</a></li>
<li><a href="https://linuxcontainers.org/lxc/articles/">Linux Containers introduction articles</a></li>
<li><a href="https://www.docker.com/">Docker</a></li>
<li><a href="https://blog.jessfraz.com/posts/docker-containers-on-the-desktop.html">Running desktop apps in docker container</a></li>
</ol>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Zend PHP Certification]]></title>
<link href="http://loginwashere.github.com/blog/2014/12/15/zend-php-certification/"/>
<updated>2014-12-15T20:04:00+00:00</updated>
<id>http://loginwashere.github.com/blog/2014/12/15/zend-php-certification</id>
<content type="html"><![CDATA[<p><img src="http://i.imgur.com/djvX5U9.gif"></p>
<p>If you saw this film - <a href="http://www.imdb.com/title/tt0061722/">The Graduate</a>, you may remember something weird in that scene.</p>
<p>At last. Wow it was cool. Yay yeah. Wait, now what?</p>
<p>Happy pair enter the bus, they are laughing and shining with joy and then you notice something, as if they start to grasp
what happened. I can’t say that I felt exactly the same, but it was close. Maybe both cases can be connected with the
accomplishment of the goal, maybe something else, I’ll try to look closer and investigate this question, but not in this post.</p>
<p>So, “Zend PHP Certification” - basic facts:</p>
<ul>
<li>70 questions: various difficulty</li>
<li>90 minutes: you manage time, can skip questions, mark questions for future review</li>
<li>three question types: one answer, multiple answers (number of right answers is specified) and one where you need to type answer (nothing long)</li>
</ul>
<p>Sources that helped me to prepare for certification:</p>
<ul>
<li><a href="http://php.net/manual/en/">php.net/manual/en/</a> - this is obvious</li>
<li><a href="http://www.zend.com/en/services/certification/php-certification-study-guide">The Zend PHP Certification Study Guide</a> - this
guide covers fast forward all topics of the certification and has samples of questions.</li>
<li><a href="http://3v4l.org/">3v4l.org</a> - cool site which allow you to run php code against almost all versions of php</li>
<li><a href="http://zend-php.appspot.com/questions_list">zend-php.appspot.com/questions_list</a> - list of questions that you may or may
not see in test. Be cautious - check answers and read comments - not all questions solves in a right way. This may be confusing but also can be helpful.</li>
<li><a href="http://www.slideshare.net/carlosbuenosvinos/zend-php-53-demo-certification-test">http://www.slideshare.net/carlosbuenosvinos/zend-php-53-demo-certification-test</a> - this
presentation contains questions from if i’m not mistaken php 5.3 study guide and is quite old but also can be helpful.</li>
</ul>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Tip: Save document opened in vim without permissions]]></title>
<link href="http://loginwashere.github.com/blog/2014/12/15/tip-save-protected-document-openned-in-vim/"/>
<updated>2014-12-15T19:47:00+00:00</updated>
<id>http://loginwashere.github.com/blog/2014/12/15/tip-save-protected-document-openned-in-vim</id>
<content type="html"><![CDATA[<p>This one can save some time for you. How much? It depends on how often you use vim and what you do with it.</p>
<p>Imagine you opened a document im vim and started making changes. Time goes by and you decide to save the document.
And guess what - you do not have permissions to do this. You opened some config in /etc/something but you did this as regular user.</p>
<p>At this point you have several ways to overcome this problem, but I only use this one lately.</p>
<p>All you need is instead of typing</p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>:w</span></code></pre></td></tr></table></div></figure>
<p>to save document, type</p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>:w sudo tee %</span></code></pre></td></tr></table></div></figure>
<p>Well, I won’t pretend, at the moment I do not know what this command do exactly, but it helps.
This way you can save document (if you know user password or user do not need one and if user can run sudo command)</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[symbol 'grub_term_highlight_color' not found]]></title>
<link href="http://loginwashere.github.com/blog/2014/10/21/symbol-grub-term-highlight-color-not-found/"/>
<updated>2014-10-21T22:42:00+00:00</updated>
<id>http://loginwashere.github.com/blog/2014/10/21/symbol-grub-term-highlight-color-not-found</id>
<content type="html"><![CDATA[<p>Those lines from title wasn’t exactly expected to appear after ubuntu 14.04 update.</p>
<p>It all started kinda from the wrong foot when I decided to finally update my home dual boot setup - ubuntu 13.04/win7.</p>
<p>During the update from 13.04 to 13.10 (it isn’t possible to update from 13.04 to 14.04 - you need to go through all steps)
Dropbox failed to update and I noticed this only when I got home from work in the evening. Day wasted.</p>
<p>But I decided that it wasn’t a big deal and I simply cancelled distro upgrade.
After reboot I noticed that I already have 13.10. That’s cool I thought andmoved to upgrade to 14.04 after removing Dropbox.
All went fine and in the end I clicked Reboot now in the modal window.</p>
<p>And that is when I faced black screen with error from title. To make colors darker - I even couldn’t get to bios when I pressed reboot like 10 times.
Strange behaviour. But then I switched computer off and on and was able to get to bios. Hooray.</p>
<p>Hopefully I have notebook and I was able to google solution for this inconvenience.
As it always happens first solution is to wipe all drives clean and reinstall everything.</p>
<p>No way I said and kept searching.
After some time I found this <a href="http://askubuntu.com/questions/449818/cant-find-boot-repair-package-for-the-newest-version-of-ubuntu">link</a> which helped me to solve my problem.</p>
<p>Basically all you need is:</p>
<ul>
<li>to create boot cd (wait what?) or flash stick</li>
<li>boot from it</li>
<li>select “Try ubuntu” option (I assume you created ubuntu boot cd/usb)</li>
<li>install boot-repair</li>
</ul>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>sudo add-apt-repository ppa:yannubuntu/boot-repair
</span><span class='line'>sudo sh -c "sed -i 's/trusty/saucy/g' /etc/apt/sources.list.d/yannubuntu-boot-repair-trusty.list"
</span><span class='line'>sudo apt-get update
</span><span class='line'>sudo apt-get install -y boot-repair && (boot-repair &)</span></code></pre></td></tr></table></div></figure>
<p>As you can see this helpful tool isn’t available for 14.04 and you need to switch it’s sources to previous ubuntu version.</p>
<ul>
<li>run</li>
</ul>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>sudo boot-repair</span></code></pre></td></tr></table></div></figure>
<p>When tool starts it is quite easy to understand what to do (I selected recommended repair)
After some time it said that all done and I was able to load both new ubuntu and good old win7.</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Tip: ssh-copy-id alternative]]></title>
<link href="http://loginwashere.github.com/blog/2014/09/30/tip-ssh-copy-id-alternative/"/>
<updated>2014-09-30T00:32:00+00:00</updated>
<id>http://loginwashere.github.com/blog/2014/09/30/tip-ssh-copy-id-alternative</id>
<content type="html"><![CDATA[<p>This one snippet also start to appear in my search results more often.</p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>cat ~/.ssh/id_rsa.pub | ssh -o PubkeyAuthentication=no user@192.168.33.10 "mkdir ~/.ssh; cat >> ~/.ssh/authorized_keys"
</span></code></pre></td></tr></table></div></figure>
<p>The key part of this one liner is:</p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>-o PubkeyAuthentication=no</span></code></pre></td></tr></table></div></figure>
<p> You can’t specify it for ssh-copy-id and without it you get this error</p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>$ Received disconnect from host: 2: Too many authentication failures for user</span></code></pre></td></tr></table></div></figure>
<p> Also other solutions can be found <a href="http://superuser.com/questions/187779/too-many-authentication-failures-for-username">here</a></p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Tip: Delete git remote tag]]></title>
<link href="http://loginwashere.github.com/blog/2014/09/30/tip-delete-git-remote-tag/"/>
<updated>2014-09-30T00:12:00+00:00</updated>
<id>http://loginwashere.github.com/blog/2014/09/30/tip-delete-git-remote-tag</id>
<content type="html"><![CDATA[<p>For a quite long period of time I’ve been using this method to delete remote tag in git repository:</p>
<ul>
<li>Find myself in a situation when you totally need to remove that pushed tag</li>
<li>Feel frustrated, because even after doing this more than 10 times I still fail to remember the command</li>
<li>Google the command</li>
<li>Click on that purple link - first in search results for “git delete remote tag”</li>
<li>Look at the command and feel embarrassed again</li>
<li>Copy paste the command to the terminal window.</li>
</ul>
<p>Today must admit that I have the problem and the first step to overcome it - add link to solution to this blog:</p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>git tag -d 12345
</span><span class='line'>git push origin :refs/tags/12345</span></code></pre></td></tr></table></div></figure>
<p><a href="http://nathanhoad.net/how-to-delete-a-remote-git-tag">source</a></p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[VirtualBox guest additions reinstall]]></title>
<link href="http://loginwashere.github.com/blog/2012/01/07/virtualbox-guest-additions-reinstall/"/>
<updated>2012-01-07T22:47:00+00:00</updated>
<id>http://loginwashere.github.com/blog/2012/01/07/virtualbox-guest-additions-reinstall</id>
<content type="html"><![CDATA[<p><img src="http://i.imgur.com/GubLdl.jpg"></p>
<p>Software development obviously needs some environment. After some time spent working as developer i’ve got strong filling,
that this envirement should be separated from my desktop. At least vitrually.</p>
<!-- more -->
<p>So i am working with server inside VirtalBox. It’s preaty hendy solution, but lack of exirience can couse some troubles.</p>
<p>For example i have computer with Windows7/Ubuntu 11.10 in dual boot and i really would like to work with
the same virtual mashine from each of the two operating systems. At the time of this writing i didn’t manage to achieve
this useful functionality, so i keep using Windows more heavily than i want (Thanks Skyrim, shame on me).</p>
<p>Just today i tryed to use ubuntu server virtual mashine, configured to use with windows and encoutered some problems.</p>
<p>So handy advise if you want to use virtual mashine in different operating systes:</p>
<ol>
<li><p>Don’t forget to remove VBoxAdditions disk after additions intallation.
Paths in ubuntu and windows to that disk are equally not acceptable.</p></li>
<li><p>If you, like me, use two adapters to connect virtual mashine to internet (NAT) and to host (Hast only Network) you
probably would be surprized to know, VirtualBox have different names for second one in linux and windows. And, yes,
these names are incompatible too. So after OS chnge you shold go to VM settings and open window with Host only netwoerk
settings. After that name will be change to propper for current OS. (Why have they done this?)</p></li>
</ol>
<p>After that if you have network properly set up - you shouldn’t fill any differece. All work like clock.</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Start playing with Zend Framework 2]]></title>
<link href="http://loginwashere.github.com/blog/2011/12/31/start-playing-with-zend-framework-2/"/>
<updated>2011-12-31T05:08:00+00:00</updated>
<id>http://loginwashere.github.com/blog/2011/12/31/start-playing-with-zend-framework-2</id>
<content type="html"><![CDATA[<p><img src="http://i.imgur.com/Nlro8.png"></p>
<p>New version of framework comes with great deal of changes and still is in beta, but definetly worth looking at.</p>
<!-- more -->
<p>Some of the biggest chenges are:</p>
<pre><code>- framework start using namespases
- redused number of singletons in project
- framework heavily rely on Dependency Injection(DI) and Dependency Injection Container(DIC)
</code></pre>
<p>To explain this concept there is <a href="http://framework.zend.com/wiki/display/ZFDEV2/Zend+DI+QuickStart">tutorial</a></p>
<p><a href="http://packages.zendframework.com/">packages.zendframework.com</a> is great place to start. There you can in
various ways download and install framework. Also it has usefull links to api, blog and wiki.</p>
<p><a href="http://akrabat.com/zend-framework/updated-tutorial-for-zend-framework-2-beta-1/">Rob Allen’s (Akrabat) tutorial</a> has been updated
to support first beta of framework. In this tutorial you can create simple catalog app using Zend Framework 2.</p>
<p>Also there you can find link to <a href="https://github.com/zendframework/ZendSkeletonApplication">ZendSkeletonApplication</a> and
way to get application and frameworn in one simple git clone.</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Simple static blog using Octopress]]></title>
<link href="http://loginwashere.github.com/blog/2011/11/24/simple-static-blog-using-octopress/"/>
<updated>2011-11-24T00:27:00+00:00</updated>
<id>http://loginwashere.github.com/blog/2011/11/24/simple-static-blog-using-octopress</id>
<content type="html"><![CDATA[<p><img src="http://i.imgur.com/NGE2a.png" title="Image tag" ></p>
<p>Comes to end year of owning my first hosting. I win it in New Year contest from Logol on habrahabr.ru.
Nice hosting, but paying even small amount of money for the thing you use one or two times a month
(games twitter and work take almost all my time) is inpractical.</p>
<!-- more -->
<p>About half a year ago i’ve discovered posibility of hosting site on github. Some time latter i tryed heroku - so paying
money for something you can get free - no way.</p>
<p>And at last i’ve found time to transfer my almost empty wordpress blog to octopress and host it on github. Choosing heroku you
can get private repository for your blog or whatever you what to host there. But it wasn’t critical for me so here i am on github.</p>
<p>Site is completely static now - just a bunch of html pages generated by Jakyll. And still it has:</p>
<pre><code>* comments thanks to Disqus,
* latest projects from github and tweets,
* code highlight
</code></pre>
<p>What else do i realy need?</p>
]]></content>
</entry>
</feed>