Informacinės technologijos

How to mount PiDrive on your Raspberry pi?

So, you bought a PiDrive from WD Labs and you want to mount it to yours Raspberry Pi? So, this tutorial might help. Note: I'm using my Raspberry Pi 3 and ordered PiDrive from NextCloud Box. And I will be using entire PiDrive as a one giant partition instead of partitioning it into several partitions.

Follow these steps:

How to delete a tag in GIT?

You create a tag in GIT, accidentally pushed it into remote repository. But after some time you understood that you don't want it. So, how can you remove a tag in GIT?

You can do this easily by:
git tag -d NAME_OF_YOUR_BAD_TAG
git push origin :refs/tags/NAME_OF_YOUR_BAD_TAG

The first command deletes this tag from your local repository, the second - from remote repository.

How to select several lines before search line in Linux?

Sometimes you need to look for something (i.e. grep) in file, but you want to see several lines BEFORE and AFTER the line you're looking for. So, how can you do this in Linux?
Try:

grep -B 3 -A 3 "Deploying" catalina.out

It looks for text "Deploying" in file catalina.out and returns 3 lines before (-B switch) and after (-A switch) the line with text "Deploying".

A start job is running for dev-disk - Ubuntu Linux 15.04

Today I had a very akward problem with my Ubuntu Linux 15.04. During boot I got a message saying:


A start job is running for dev-disk

And a timer. As a result, the boot of Linux was delayed for about 1 min 30 s. So, what did I do about it?

I opened sudo vim /etc/fstab and found that the SWAP partition was described as:

Do you want to have Google in every new Firefox tab?

Today I wanted that each of Firefox tab I open had a Google page in it. So, when I click Ctrl + T in Firefox - new tab opens with Google. How can we do it?

  • Open new tab in Firefox.
  • Enter: about:config in URL Address Bar.
  • Click on "I'll be careful, I promise!".
  • Search for browser.newtab.url.
  • Change a value of it to anything you want. I picked: https://www.google.lt/?gws_rd=ssl

You're done! :) You have Google in every new tab of Firefox.

Oracle's OCAJP (1Z0-803) exam passed!

Last week I've passed Oracle Certified Associate, Java SE 7 Programmer(1Z0-803) exam with not a very shining score of 85%. So, I've decided to give some tips & tricks for readers of my blog on how to prepare and pass the exam.

First of all - my impressions about the exam. Exam is tough. The exam asks simple questions (lets say - basics) about Java, but you must know them. For example: Is there a difference between:

Howto install NVidia drivers on Ubuntu Linux 12.10

Today I wanted to install NVidia drivers for my NVidia GeForce GTX 560 on my Ubuntu Linux 12.10 OS. I googled a bit and found a very good web site: http://www.dedoimedo.com/computers/ubuntu-quetzal-nvidia.html

P.S. Just one tip: start reading from Step 2 ;)