Acnezine PA Hire London Bali Real Estate

GoogleCL: Using Google services from the command line

June 02

GoogleCL: Usando los servicios de Google desde la command line

I have not wrote anything because I was too busy with facu truth and work.

Today I come to tell you about GoogleCL a tool for command-line Linux and Mac
There for a while now, but the truth had never found much use but today if : P

Allows you to use all google services from the command line.

For example we know that we have on our calendar today? google calendar today
We add a new task in the calendar? google calendar add "Partial Artificial Intelligence at 7 pm next wednesday." And only recognizes the day and date!
want to upload a new doc to GDocs? google docs upload PATH / TO / FILE
Want to upload photos to picassa? picasa post-title "My Cat Photos" photos / cats / * "

Specifically works with the following services:
'Picasa', 'blogger', 'youtube', 'docs', 'contacts', 'calendar', 'finance'

And giving google help [service] helps us strip about the service and the things that we can ask. For example google calendar help.

To install just do:
sudo apt-get install GoogleCL

As an extra tip, using GoogleCL Unity is a launcher for you that you drag a file and uploads only GDoc and from there we can also create documents.

To download must run the following:

  sudo apt-get install zenity
 cd Downloads /
 wget http://webupd8.googlecode.com/files/gdocs-unity.tar.gz
 tar-xvf-unity.tar.gz GDocs
 gdocs-unity/gdocs.desktop mv ~ / .local / share / applications
 gdocs-unity/docs-128.png mv ~ /. icons /
 chmod + x ~ / Downloads / GDocs-unity / docsHelper
 sed-i "s / Exec = \ / path \ / to \ / docsHelper / Exec \ = \ / home \ / $ USER \ / Downloads \ / GDocs-unity \ / docsHelper /" ~ / .local / share / applications / gdocs.desktop
 rm-unity.tar.gz GDocs 

Before you can use it must provide access to GDocs. For this, from the console will give google docs upload and there is going to request access to our google account the first time!

Hope this helps!

Read More

Empathy Tips: How to close the window with Esc Shortcut and change the windows change

May 18

Tips para Empathy: Como cerrar la ventana con Esc y cambiar el Shortcut de cambio de ventanas

The other day I decided to delete my Ubuntu 11.04 Pidgin and Empathy settle due to its integration.
As soon I started to test the application I found 2 major problems.

  1. I can not switch between windows with Ctrl + Tab
  2. I can not close the existing window with Esc or Escape

According to the creators of these are not bugs Empathy, but says Gnome Escape = Cancel and Ctrl + Tab = switch focus between text elements. That is why to be consistent with Gnome not want to put these options in your code.

Then figure out for a long time I found the fix to this problem.

There is a file in the file system are set up where all actions can be performed on our GTK window. These actions have what is called "Accelerators" are keyboard shortcuts.

First we go to the file: / usr / share / empathy / empathy-chat-window.ui

We will edit as sudo (sudo gedit / usr / share / empathy / empathy-chat-window.ui).

Once opened you will see that XML is a common and current with various actions.

First of all you look for the following line:

  <object class="GtkAction" id="menu_conv_close"> 

You will see that below this line there will be some similar to:

  key="q" <accelerator modifiers="GDK_CONTROL_MASK"/> 

What this says is that to close the conversation not touch Ctrl + K. We want to change it to Escape, then change the line above with:

  <accelerator key="Escape"/> 

and ready :) .

Going to the second problem of changing the windows with Ctrl + Tab is a bit more complicated. By default, GNOME does not let us change the windows with Ctrl + Tab and in turn, does not leave any GTK application bindear a shortcut to the Tab key. If we wanted to do this, we should touch the code and change a FLAG Empathy to let us step on what Gnome says. As this was going to be hard work, decided to change Ctrl + Tab and Ctrl + Shift + Tab to Ctrl + A in this case, which is quite similar.

Then look for now in the same file the following 2 lines

  <object class="GtkAction" id="menu_tabs_prev"> 
  <object class="GtkAction" id="menu_tabs_next"> 

And change the two accelerators. The current shortcuts say to change tab you have to use Ctrl + PageDown, which means that the shortcut I have to use about 3 coats : P . Then change the following respectively:

  key="a" <accelerator modifiers="GDK_CONTROL_MASK|GDK_SHIFT_MASK"/> 
  key="a" <accelerator modifiers="GDK_CONTROL_MASK"/> 

After that, reboot Empathy and voila!

I leave you my configuration file to decide stepped directly:

 <? Xml version = "1.0"?> <! - * - Mode: xml - * -> <object class="GtkUIManager" <interface> id="ui_manager"> <child> <object class = "GtkActionGroup" id = "actiongroup1"> <object class="GtkAction" <child> id="menu_conv"> <property name="name"> menu_conv </ property> <property name="label" translatable="yes"> _Conversation < / property> </ object> </ child> <object class="GtkAction" <child> id="menu_conv_clear"> <property name="stock_id"> gtk-clear </ property> <property name="name"> menu_conv_clear </ property> <property name="label" translatable="yes"> C_lear </ property> </ object> <accelerator key="L" modifiers="GDK_CONTROL_MASK"/> </ child> <child> <object class = "GtkAction" id = "menu_conv_insert_smiley"> <property name="icon-name"> face-smile </ property> <property name="name"> menu_conv_insert_smiley </ property> <property name = "label" translatable = "yes"> Insert _smiley </ property> </ object> </ child> <object class="GtkToggleAction" <child> id="menu_conv_favorite"> <property name="name"> menu_conv_favorite </ property> <property name = "label" translatable = "yes"> _Favorite Chat Room </ property> </ object> </ child> <object class="GtkToggleAction" <child> id="menu_conv_always_urgent"> <property name="name"> menu_conv_always_urgent </ property> <property name="label" Notify translatable="yes"> for All Messages </ property> </ object> </ child> <object class="GtkToggleAction" <child> id="menu_conv_toggle_contacts"> < property name = "name"> menu_conv_toggle_contacts </ property> <property name="active"> True </ property> <property name="label" translatable="yes"> _Show Contact List </ property> </ object> < / child> <object class="GtkAction" <child> id="menu_conv_invite_participant"> <property name="name"> menu_conv_invite_participant </ property> <property name="label" translatable="yes"> _Participant Invite ... </ property> </ object> </ child> <object class="GtkAction" <child> id="menu_conv_close"> <property name="stock_id"> gtk-close </ property> <property name="name"> menu_conv_close </ property> </ object> <accelerator key="Escape"/> </ child> <object class="GtkAction" <child> id="menu_contact"> <property name="name"> menu_contact </ property> <property name="label" translatable="yes"> C_ontact </ property> </ object> </ child> <object class="GtkAction" <child> id="menu_edit"> <property name="name"> menu_edit </ property> <property name="label" translatable="yes"> _edit </ property> </ object> </ child> <object class="GtkAction" <child> id="menu_edit_cut"> <property name = "stock_id"> gtk-cut </ property> <property name="name"> menu_edit_cut </ property> </ object> <accelerator key="X" modifiers="GDK_CONTROL_MASK"/> </ child> <child> <object class="GtkAction" id="menu_edit_copy"> <property name="stock_id"> gtk-copy </ property> <property name="name"> menu_edit_copy </ property> </ object> <accelerator key = " C "modifiers =" GDK_CONTROL_MASK "/> </ child> <object class="GtkAction" <child> id="menu_edit_paste"> <property name="stock_id"> gtk-paste </ property> <property name =" name "> menu_edit_paste </ property> </ object> <accelerator key="V" modifiers="GDK_CONTROL_MASK"/> </ child> <object class="GtkAction" <child> id="menu_edit_find"> <property name =" stock_id "> gtk-find </ property> <property name="name"> menu_edit_find </ property> </ object> <accelerator key="F" modifiers="GDK_CONTROL_MASK"/> </ child> <child> <object class = "GtkAction" id = "menu_tabs"> <property name="name"> menu_tabs </ property> <property name="label" translatable="yes"> _Tabs </ property> </ object> </ child> <object <child> class="GtkAction" id="menu_tabs_prev"> <property name="name"> menu_tabs_prev </ property> <property name="label" translatable="yes"> _Previous Tab </ property> </ object> <accelerator key="a" modifiers="GDK_CONTROL_MASK|GDK_SHIFT_MASK"/> </ child> <object class="GtkAction" <child> id="menu_tabs_next"> <property name="name"> menu_tabs_next </ property > <property name="label" translatable="yes"> _NEXT Tab </ property> </ object> <accelerator key="a" modifiers="GDK_CONTROL_MASK"/> </ child> <child> <object class = " GtkAction "id =" menu_tabs_undo_close_tab "> <property name="name"> menu_tabs_undo_close_tab </ property> <property name="label" translatable="yes"> _Undo Close Tab </ property> </ object> <accelerator key =" t "modifiers =" GDK_SHIFT_MASK | GDK_CONTROL_MASK "/> </ child> <object class="GtkAction" <child> id="menu_tabs_left"> <property name="name"> menu_tabs_left </ property> <property name =" label "translatable =" yes "> Move Tab _Left </ property> </ object> <accelerator key="Page_Up" modifiers="GDK_CONTROL_MASK|GDK_SHIFT_MASK"/> </ child> <child> <object class =" GtkAction "id = "menu_tabs_right"> <property name="name"> menu_tabs_right </ property> Move Tab <property translatable="yes"> name="label" _Right </ property> </ object> <accelerator key = "PAGE_DOWN" modifiers = "GDK_CONTROL_MASK | GDK_SHIFT_MASK" /> </ child> <object class="GtkAction" <child> id="menu_tabs_detach"> <property name="name"> menu_tabs_detach </ property> <property name = "label" translatable = " yes "> _Detach Tab </ property> </ object> </ child> <object class="GtkAction" <child> id="menu_help"> <property name="name"> menu_help </ property> <property name = "label" translatable = "yes"> _Help </ property> </ object> </ child> <object class="GtkAction" <child> id="menu_help_contents"> <property name="stock_id"> gtk-help < / property> <property name="name"> menu_help_contents </ property> <property name="label" translatable="yes"> _Contents </ property> </ object> <accelerator key = "F1" modifiers = "" / > </ child> <object class="GtkAction" <child> id="menu_help_about"> gtk-about <property name="stock_id"> </ property> <property name="name"> menu_help_about </ property> < / object> </ child> </ object> </ child> <UI> <menubar name="chats_menubar"> <menu action="menu_conv"> <menuitem action="menu_conv_clear"/> <menuitem action = "menu_conv_insert_smiley" /> <menuitem action="menu_conv_favorite"/> <menuitem action="menu_conv_always_urgent"/> <menuitem action="menu_conv_toggle_contacts"/> <menuitem action="menu_conv_invite_participant"/> <separator/> <menuitem action = "menu_conv_close" / > </ menu> <menu action="menu_contact" /> <menu action="menu_edit"> <menuitem action="menu_edit_cut"/> <menuitem action="menu_edit_copy"/> <menuitem action="menu_edit_paste"/> < separator /> <menuitem action="menu_edit_find"/> </ menu> <menu action="menu_tabs"> <menuitem action="menu_tabs_prev"/> <menuitem action="menu_tabs_next"/> <menuitem action = "menu_tabs_undo_close_tab" / > <separator/> <menuitem action="menu_tabs_left"/> <menuitem action="menu_tabs_right"/> <menuitem action="menu_tabs_detach"/> </ menu> <menu action="menu_help"> <menuitem action = "menu_help_contents "/> <placeholder name="LaunchpadItems"/> <menuitem action="menu_help_about"/> </ menu> </ menubar> </ u> </ object> <object class="GtkWindow" id="chat_window"> <property name="title" translatable="yes"> Chat </ property> <property name="role"> chat </ property> <property name="default_width"> 580 </ property> <property name = "default_height "> 480 </ property> <object class="GtkVBox" <child> id="chat_vbox"> <property name="visible"> True </ property> <child> <object class =" GtkMenuBar "builder =" ui_manager "id =" chats_menubar "> <property name="visible"> True </ property> </ object> <property name="expand"> <packing> False </ property> <property name="fill"> False < / property> </ packing> </ child> <child> <placeholder/> </ child> </ object> </ child> </ object> </ interface> 
Read More

Script to select, extract, make direct and clear access to your movies downloaded rars

May 10

Script para elegir, descomprimir, hacer acceso directo y borrar los rars de tus peliculas bajadas

Below publishes a new script. This script is made for when under movies or series.
Basically what it does is show the entire contents of the folder down with a number beside each name. Then choose the numbers of series or movies to see separated by commas and the program will unzip the rars or zip if any, make a shortcut to the selected folder only the movie, before erasing the samples should be one.
Previously, the script used to search for subtitles periscope internet. The problem with this program is that search subdivx.com subtitulos.es and not so for the moment it out.
Below I add 2 scripts, one to list the movies to watch and one to list the movies to delete those that were already seen.

First the list of movies to see:

 #! / Bin / bash TORRENT_DIR = '/ home / gonto / downloads / torrents'; VIDEOS_DIR = "/ home / gonto / Desktop / videos" pushd.  ls-tr $ TORRENT_DIR | columns-c 1 | awk 'BEGIN {i = 0;} {i + +; print i, $ 0}'; echo That elegis numbers?  Separated by comma, read nums; # Separating the numbers made dressage OLD_IFS = "$ IFS" IFS = "," numsArr = ($ nums) # Itero for each number for num in $ {numsArr [@]} do MOVIE = $ (ls-tr $ TORRENT_DIR | columns-c 1 | sed-n $ (echo $ {num} p)); if [-n "$ MOVIE"] then PELI_PATH = "$ TORRENT_DIR / $ MOVIE" PELIS_A_MODIFICAR = "$ PELIS_A_MODIFICAR $ PELI_PATH, "fi done movies = ($ PELIS_A_MODIFICAR) for PELI_PATH in $ {movies [@]} do if [-f" $ PELI_PATH "] then ln-fs" $ PELI_PATH "$ VIDEOS_DIR else cd" $ PELI_PATH "find" $ PELI_PATH "-name" * avi "| xargs-I" {} "} {zip and find" $ PELI_PATH "-name" *. [rR]? "  | Xargs-I "{}"} {rm find "$ PELI_PATH"-name "* [sS] [aA] [mM] [pP] [lL] [eE] *" | xargs-I "{}" rm { find} "$ PELI_PATH"-name "*. [aA] [vV] [iI]" | xargs-I "{}" ln-s {} $ VIDEOS_DIR find "$ PELI_PATH"-name "*. [mM] [ kK] [vV] "| xargs-I" {} "ln-s $ {} fi done popd VIDEOS_DIR IFS =" $ OLD_IFS " 

And now in charge of erasing

  #! / Bin / bash
 TORRENT_DIR = '/ home / gonto / downloads / torrents';
 VIDEOS_DIR = "/ home / gonto / Desktop / videos";
 ls-tr $ TORRENT_DIR | columns-c 1 | awk 'BEGIN {i = 0;} {i + +; print i, $ 0}';
 That miss elegis numbers?  Separated by commas;
 read nums;
 # Separating the numbers made with dressage
 OLD_IFS = "$ IFS"
 IFS = ""
 numsArr = ($ nums)
 PELIS_A_BORRAR = ""
 # Itero for each number
 for num in $ {numsArr [@]}
 do
 MOVIE = $ (ls-tr $ TORRENT_DIR | columns-c 1 | sed-n $ (echo $ {num} p));
 if [-n "$ MOVIE"]; Then
 PELI_PATH = "$ TORRENT_DIR / $ MOVIE"
 PELIS_A_BORRAR = "$ PELIS_A_BORRAR $ PELI_PATH"
 fi
 done
 movies = ($ PELIS_A_BORRAR)
 for movie films in $ {[@]}
 do
 rm-rf $ movie
 done
 IFS = "$ OLD_IFS" 

Obviously for both scripts will have to change the directory of torrents and video for you queiran list and make shortcuts respectively.

Any criticism or improvement to the scripts will be well taken :) . Someone suggested that I add to the shortening of URLs copied to the clipboard and did :)

Slds!

Read More

Script to shorten URLs with Clipboard support

May 10

A friend just mentioned that would be good to add the script to display the console besides the result of shortening the url, it is sent to the clipboard and be that eventually this will be what we do.

For this, first install the program xclip (with apt-get) and then replace the existing script that we have to shorten the following, replacing as before the user and the api:

  #! / Bin / bash
 progname = $ (basename $ 0)
 if [-z "$ 1"]
 Then
         echo-e "Usage: $ progname url"
         exit
 fi
 URL = $ 1

 BITLYURL = 'http://api.bit.ly/v3/shorten?login=NOMBRE_USUARIO&apiKey=API_KEY&format=json'
 Encodedurl = $ (python-c "import urllib; print urllib.quote ('' '$ URL''')")
 RESPONSE = $ (/ usr / bin / env curl-s-A $ BITLYURL Mozilla '& longUrl =' $ encodedurl)
 TEXT = $ (echo $ RESPONSE | sed-e 's / [{}] /'' / g' | awk-vk = "text" '{n = split ($ 0, a, "") for (i = 1, i <= n, i + +) print a [i]} '| sed-n 4p | cut-c 9 - | sed' s / "/ / g '| sed' s / \ \ / / g ')
 echo $ TEXT
 echo $ TEXT | xclip-selection c 
Read More

Computer the size of a Pen Drive to 25 USD

May 07

Computadora del tamaño de un Pen Drive a 25 USD

Truth shocking news I read today play.
A video game designer who lives in the UK developed a computer the size of a USB Pen Drive that will leave 25 dollars.
This computer will have Ubuntu installed by default and will be operable.

Will come with HDMI and USB ports hence we connected by HDMI monitor and USB mouse and keyboard and have a functional computer.

This picture you see here above is the entire computer. And this computer has the following components:

  • 700MHz ARM11
  • 128MB of SDRAM
  • OpenGL ES 2.0
  • 1080p30 H.264 decode high-profile
  • HDMI and composite video output
  • USB 2.0
  • SD / MMC / SDIO memory card slot
  • General-purpose I / O

Incredible, no? And only $ 25. I want one!

Read More

Script to shorten URLs

May 06

Script para acortar URLs

We continue with the wave of post scripts. Another script I use a lot and is completely of my authorship is one to shorten URLs. I often want to pass a URL shortened post on Facebook or pass it on to someone or a variety of things. The truth is that having to go to the website to shorten copy is much laburo and console is much easier.
This particular script uses bit.ly which in my opinion is the best, which has more stats and everything. What you're going to have to replace into the script is your user name and API Key of bit.ly. After that just call to
bitly http://www.google.com/ and they will appear the shortened URL. More simply impossible.

The fields are replacing yourusername and TU_KEY.
Basically what it does is to first use a python library to encode the URL as the bit.ly REST API URL used encodeadas. Then we hit with Curl bit.ly and then using sed and awk get the url :) .
Here is the script I : D and happy shortening : D

  #! / Bin / bash
 progname = $ (basename $ 0)
 if [-z "$ 1"]
 Then
         echo-e "Usage: $ progname url"
         exit
 fi
 URL = $ 1

 BITLYURL = 'http://api.bit.ly/v3/shorten?login=TU_USUARIO&apiKey=TU_KEY&format=json'
 Encodedurl = $ (python-c "import urllib; print urllib.quote ('' '$ URL''')")
 RESPONSE = $ (/ usr / bin / env curl-s-A $ BITLYURL Mozilla '& longUrl =' $ encodedurl)
 echo $ RESPONSE | sed-e 's / [{}] /'' / g' | awk-vk = "text" '{n = split ($ 0, a, "") for (i = 1, i <= n, i + +) print a [i]} '| sed-n 4p | cut-c 9 - | sed' s / "/ / g '| sed' s / \ \ / / g ' 
Read More