Install InstantClient on Ubuntu

There are many tutorials, but I want to complete with some tricks I just found :

  1. in your .bashrc, just add at the end :
    # Oracle instant client
    export LD_LIBRARY_PATH=/home/sinclair/Products/instantclient_10_2
  2. in your untargzed directory of ruby-oci8 installation, create a script file with :
    #!/bin/bash
    export LD_LIBRARY_PATH=/home/sinclair/Products/instantclient_10_2
    ruby setup.rb configure
    make
    make install
  3. launch this script with sudo command

Smbfs / Cifs share on Synology NAS and Ubuntu

If you get some issue with mounting shares with your NAS from your Ubuntu OS, consider this :

With SMBFS : this solution is unsupported, you have to use CIFS. For example, in your fstab :

//192.168.1.250/public /media/NAS cifs iocharset=utf8,user=diskstation_username,password=diskstation_password,rw,uid=ubuntu_username,gid=ubuntu_username 0 0

With CIFS : if you can mount your share directory, but listing returns always an empty list, there is the solution.

I found another workaround in a ds101 mailing list : you can disable “unix extensions” in the ds106’s samba server. To achieve this, you need to add the folowing line in the [global] section of /usr/syno/etc/smb.conf :

Code:
unix extensions=no

Then, restart samba :
DiskStation> /usr/syno/etc/rc.d/S80samba.sh restart

source : http://www.synology.com/enu/forum/viewtopic.php?=&p=6244

Ubuntu post installation

Must have package that should be installed by default (if you use Nautilus) :

  • nautilus-image-converter

And another file manager (IMHO better than Nautilus) :

  • thunar : for example, you can with a simple right click send files or even directory to thunderbird (strictly impossible with Nautilus), you can launch a term in the current directory, you can paste into the folder trackbar, etc.

How to replace definitely Nautilus by Thunar ? 2 solutions :

Ruby vs Java

Un article avec évidemment un parti pris, mais qui met tout de même en avant quelques avantages certains à programmer en Ruby…

http://www.rubyrailways.com/sometimes-less-is-more/

Quelques perles :

Java:

Class Circle
private Coordinate center, float radius;

public void setCenter(Coordinate center)
{
this.center = center;
}

public Coordinate getCenter()
{
return center;
}

public void setRadius(float radius)
{
this.radius = radius;
}

public Coordinate getRadius()
{
return radius;
}
end;

Ruby:

class Circle
attr_accessor :center, :radius
end

ou encore :

Java:

new Date(new Date().getTime() - 20 * 60 * 1000)

Ruby:

20.minutes.ago

UML tools under Linux

After some researchs, I have tested Umbrello which is directly installable from Synaptic and Bouml that you can find here in deb format package.

I found that Umbrello is very intuitive, you can import Java classes, make some code reverse engineering and of course generate code. But you don’t have all UML schemas (for example, I didn’t find sequence diagram).

Bouml includes every UML diagrams that I known and is a good alternative.

MVNO’s prices in EU (Cellphone call rates)

In order to compare, I will give you the prices of few europeans contry, thoses prices are based on Prepaid card only, and are the cheapest of the country.

I will not write the suscription/sim card fees since they are not consumption based.

The prices are per minute, and (per second) is written when a minute can be divised.

France

Call: 0,42 €/mn (second after the first second)

SMS: 0,10€

MMS: 0,30€

DATA(Gprs): 0,15€/10kb (yes 15€/Bb)

Minimum price per month : 3,33€

MVNO: Virgin Mobile

UK

Call: 0,22 €/mn (First 5 minutes of call) and 0,07€/min after

SMS: 0,17€

MMS: 0,35€

DATA(Gprs): 1€/Mb (limitted at 1,2 per day)

International: 0,30€/min

Minimum price per month : NA

MVNO: Virgin Mobile

ITALY

Call: 0,19 €/mn

SMS: 0,15€

MMS: 0,60€

DATA: NA

International: 0,50€/min

Minimum price per month : 15€

MVNO: Tim

SPAIN

Call: 0,14 €/mn (per sec) + 0,14€/call (establishment)

SMS: 0,12€

MMS: 0,35€

DATA(Gprs or 3G): 0,007€/Kb

International: 0,60€/min

Minimum price per month : 7€

MVNO: Yoigo

Belgium

Call: 0,20 €/mn (second after the first minute)

SMS: 0,10€

MMS: 0,39€

DATA(Gprs): NA

International: 0,65€/min

Minimum price per month : NA

MVNO: Simyo

Germany

Call: 0,15 €/mn (second after the first minute)

SMS: 0,10€

MMS: 0,39€

DATA(Gprs): 0,24€/Mb

International: 0,30€/min

Minimum price per month : NA

MVNO: Simyo

Austria

Call: 0,069 €/mn

SMS: 0,15€

MMS: 0,30€

DATA: NA

International: NA

Minimum price per month : NA

MVNO: Yesss

Finland

Call: 0,07 €/mn (second after the first second)

SMS: 0,07€

MMS: 0,35€

DATA(Gprs or 3G): 0,70€/Mb

International: 0,57€/min

Minimum price per month : 0,50€

MVNO: Kolumbus

Resume SCP

A very good article, very useful, thanx to its author !

I often use the UNIX command line tool scp (secure copy) to copy a file to a remote server. However, scp has one major drawback: It doesn’t support resuming a transfer. So whenever I’m transferring a file and something comes up which interrupts my transfer–which is bound to happen–I’m cursing away at scp. The solution? Use rsync. It is overkill for most things I do, but when a transfer is interrupted, it is handy. Now, on to the doing.

I want to transfer the file “myFile” to the server “remoteMachine”, which I do with scp:
scp myFile remoteMachine:dirToPutIn/
(You should know this already if you’re reading this in the first place.)

(Muzak while the transfer is in progress; a loud wail and the sound of hair being torn out by its roots as the transfer comes to a grinding halt.)

Time to resume the file with rsync, which I do thusly:
rsync --partial --progress myFile remoteMachine:dirToPutIn/
The “–partial” argument is what does the trick. I added “–progress” because I like to see how the transfer is going; rsync understandably doesn’t show this by default as it is mostly used for purposes which don’t require live progress reporting (e.g. scheduled backups).

Because I know I’ll have this problem again at some point, I have created an alias in my shell’s (zsh) configuration file (~/.zshrc):
alias scpresume="rsync --partial --progress"
I know that rsync and scp are not necessarily related, but the name “scpresume” reflects the purpose of the task I wish to do. And getting it done is what matters the most after all.

Update:
Jan pointed out in a comment that rsync communication is not secure by default, and that you should use tunneling to achieve secure communication. Andi provides the solution which is quite simple: Use --rsh=ssh (use ssh as the remote shell). Thus, our alias from before would look like this: alias scpresume="rsync --partial --progress --rsh=ssh"

source