05 August 2011

visit the friendly team @ #DigitalAddiction on Irc.Digitaladdiction.info

04 August 2011

a linux file system primer: $man hier

$man hier

HIER(7)                                       Linux Programmer's Manual                                       HIER(7)


       hier - Description of the file system hierarchy


       A typical Linux system has, among others, the following directories:

       /      This is the root directory.  This is where the whole tree starts.

       /bin   This  directory contains executable programs which are needed in single user mode and to bring the system up or repair it...

view 3 googlecl examples at commandlinefu http://goo.gl/hHR6o

via www.commandlinefu.com/commands/tagged/1440/googlecl

Create commands to download all of your Google docs

google docs list |awk 'BEGIN { FS = "," }; {print "\""$1"\""}'|sed s/^/google\ docs\ get\ /|awk ' {print $0,"."}'

Create commands to download all of your Picasaweb albums

google picasa list-albums |awk 'BEGIN { FS = "," }; {print "\""$1"\""}'|sed s/^/google\ picasa\ get\ /|awk ' {print $0,"."}'

Convert GoogleCL gmail contacts to cone adress book

google contacts list name,name,email|perl -pne 's%^((?!N\/A)(.+?)),((?!N\/A)(.+?)),([a-z0-9\._-]+\@([a-z0-9][a-z0-9-]*[a-z0-9]\.)+([a-z]+\.)?([a-z]+))%${1}:${3} <${5}>%imx' #see below for full command

check out the new googlecl apis. great stuff Michael

from googlegroups.com

Hey all!

Just added support for the new Discovery APIs to GoogleCL.

What does this mean? Lots of new APIs are available! Including Tasks,
Buzz, UrlShortener, Translate, and a dozen or so others.

So please, go test! Instructions and examples will be up soonish.


GoogleCL Homepage

03 August 2011

convert text to html in vim with :TOhtml

vim test

this is a tip


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Vim/7.3">
<meta name="plugin-version" content="vim7.3v6">
<meta name="syntax" content="html">
<meta name="settings" content="use
<style type="text/css">
pre { font-family: monospace; color: #eeeeee; background-color: #262626; }
body { font-family: monospace; color: #eeeeee; background-color: #262626; }
this is a test

vim creates a new buffer named test.html. esc :w to write the buffer to file

get aria2 to download from the command line with aria2c http://example.org/mylinux.iso

supports bit torrent and multiple connections. aria2 homepage.

indent from normal mode in #vim with >>

remove indent with ==

search for string at the start of a line in #vim with /^string

/string - Search forward for string
?string- Search back for string
n - Search for next instance of string
N -Search for previous instance of string

02 August 2011

try some console based time wasters for linux

try each in ubuntu with sudo apt-get install ...


01 August 2011

view cpu information with cat /proc/cpuinfo

$ cat /proc/cpuinfo

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 13
model name : Intel(R) Pentium(R) M processor 1.73GHz
stepping : 8
cpu MHz : 800.000
cache size : 2048 KB
fdiv_bug : no
hlt_bug : no
fpu : yes
cpuid level : GenuineIntel
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov clflush dts acpi mmx fxsr sse sse2 ss tm pbe up bts est tm2
bogomips : 1596.31
clflush size : 64

31 July 2011

try panel window controls in gnome with #gnome-window-applets

from gnome-look.org

delete foo and all subsequent text on every line in #vim with :%s/foo*//

print line n of a file with sed -n 'n{p;q}' file

$ cat jack_and_jill
jack and jill
went up the hill
to fetch
a pail of water
jack fell down
and broke his crown
and jill came tumbling after
$ sed -n '4{p;q}' jack_and_jill
a pail of water

get ubuntu distro details with lsb_release -a

from help.ubuntu.com/community/UsingTheTerminal

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 11.04
Release: 11.04
Codename: natty

meta post with googlecl

a test post using googlecl. get it today from http://code.google.com/p/googlecl/

play a #roguelike in #ubuntu with sudo apt-get install powder

Powder website and wiki. Install in ubuntu with:

sudo apt-get install powder

remove tabs in a file with tr -d '\011' < old.txt > new.txt #linux #unix

tr command delete tabs in file: "If you just want to delete the tabs, try:

tr -d '\011' newfile

but if you would rather convert the tabs to spaces, then try:

expand filename >newfile"

change main menu icon in ubuntu in gconf-editor apps panel objects

delete all text on the linux command line with ctrl+shift+-

Some commandline shortcut combinations:

  • ctrl+k deletes all characters after the cursor
  • ctrl+u deletes everything before the cursor
  • ctrl+a: moves to the start of the line
  • ctrl+e: moves to the end of the line
  • ctrl+shift+-: deletes the entire line regardless of where the cursor is