Thursday, April 30, 2015

Repair USB sticks



The next command wipes the entire disk, not only the partition table. (tested)
 sudo dd if=/dev/zero of=/dev/sdb bs=1M

( to see what path is your stick use the command `lsblk`)




To only wipe the partition table and Master Boot Record do

sudo dd if=/dev/zero of=/dev/sdb bs=512 count=1






to see the progress of this, open a separate terminal window and
watch -n5 'sudo kill -USR1 `pgrep ^dd`'
 
 
You will need to use gparted to create a new partition table and format.

Tuesday, April 28, 2015

Istall Adobe Reader in Ubuntu 14.04


For Ubuntu 14.04 LTS (or 13.10), 32 or 64-bit

[ from: http://ask.xmodulo.com/install-adobe-reader-ubuntu-13-10.html ]
Adobe Reader 9 is not in the 'Partner' repository for 13.10 (or later).
  1. Download Adobe Reader (32-bit), from Adobe site:
    From here: ftp.adobe.com .. reader .. 9.5.5
  2. Open a command line, change to the directory containing .deb file.
  3. Install package, forcing to accept 32-bit version and any errors:
    
    
    sudo dpkg -i --force-architecture AdbeRdr9.5.5-1_i386linux_enu.deb
    
    
    
    sudo apt-get -f install
  4. Add the missing 32-bit libraries: (skip this step for 32-bit)
     
    sudo apt-get install libxml2:i386 lib32stdc++6
  5. (OPTIONAL) Run for first time, to get icon in Unity menu bar.
     
    acroread <path>/<MyDocument>.pdf
     

Friday, April 24, 2015

Google search and translate selected text with shortcut



Install xclip

sudo apt-get install xclip

opensuse -here

Create a script like so:
#! /bin/sh
sh -c 'firefox "https://www.google.com/search?q=$(xclip -o)"'

Save it as google-search.sh

For translating:
#! /bin/sh
'sh -c 'firefox "http://translate.google.com.ar/#en/fr/$(xclip -o)"'

Adapt for custom languages, save as google-translate.sh

Add shortkey for `sh path_to_our_script`