Dmitriy Savchenko

Don't panic

Zend PHP Certification

If you saw this film - The Graduate, you may remember something weird in that scene.

At last. Wow it was cool. Yay yeah. Wait, now what?

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.

So, “Zend PHP Certification” - basic facts:

  • 70 questions: various difficulty
  • 90 minutes: you manage time, can skip questions, mark questions for future review
  • three question types: one answer, multiple answers (number of right answers is specified) and one where you need to type answer (nothing long)

Sources that helped me to prepare for certification:

Tip: Save Document Opened in Vim Without Permissions

This one can save some time for you. How much? It depends on how often you use vim and what you do with it.

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.

At this point you have several ways to overcome this problem, but I only use this one lately.

All you need is instead of typing

1
:w

to save document, type

1
:w sudo tee  %

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)

Symbol ‘Grub_term_highlight_color’ Not Found

Those lines from title wasn’t exactly expected to appear after ubuntu 14.04 update.

It all started kinda from the wrong foot when I decided to finally update my home dual boot setup - ubuntu 13.04/win7.

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.

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.

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.

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.

No way I said and kept searching. After some time I found this link which helped me to solve my problem.

Basically all you need is:

  • to create boot cd (wait what?) or flash stick
  • boot from it
  • select “Try ubuntu” option (I assume you created ubuntu boot cd/usb)
  • install boot-repair
1
2
3
4
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo sh -c "sed -i 's/trusty/saucy/g' /etc/apt/sources.list.d/yannubuntu-boot-repair-trusty.list"
sudo apt-get update
sudo apt-get install -y boot-repair && (boot-repair &)

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.

  • run
1
sudo boot-repair

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.

Tip: Ssh-copy-id Alternative

This one snippet also start to appear in my search results more often.

1
cat ~/.ssh/id_rsa.pub | ssh -o PubkeyAuthentication=no user@192.168.33.10 "mkdir ~/.ssh; cat >> ~/.ssh/authorized_keys"

The key part of this one liner is:

1
-o PubkeyAuthentication=no

You can’t specify it for ssh-copy-id and without it you get this error

1
$ Received disconnect from host: 2: Too many authentication failures for user

Also other solutions can be found here

Tip: Delete Git Remote Tag

For a quite long period of time I’ve been using this method to delete remote tag in git repository:

  • Find myself in a situation when you totally need to remove that pushed tag
  • Feel frustrated, because even after doing this more than 10 times I still fail to remember the command
  • Google the command
  • Click on that purple link - first in search results for “git delete remote tag”
  • Look at the command and feel embarrassed again
  • Copy paste the command to the terminal window.

Today must admit that I have the problem and the first step to overcome it - add link to solution to this blog:

1
2
git tag -d 12345
git push origin :refs/tags/12345

source

VirtualBox Guest Additions Reinstall

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.

Simple Static Blog Using Octopress

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.