When running 'gem server' flickr-1.0.2 gem did not have any docs available (on OS X10.5 at least). So to add the flickr rdoc into the gem server :
find the location of your gems, you can use locate.
$locate flickr
/Library/Ruby/Gems/1.8/doc/flickr-1.0.2
/Library/Ruby/Gems/1.8/gems/flickr-1.0.2
$cd /Library/Ruby/Gems/1.8/gems/flickr-1.0.2
$rake rdoc
$mkdir /Library/Ruby/Gems/1.8/doc/flickr-1.0.2/rdoc
$cp /Library/Ruby/Gems/1.8/gems/flickr-1.0.2/doc/* /Library/Ruby/Gems/1.8/doc/flickr-1.0.2/rdoc
Now start the gem server and the rdoc link should be active.
$gem server
Twitter Updates
Wednesday, 29 October 2008
Tuesday, 28 October 2008
Display command output from bash script
To directly display the output from a command in a bash script (do not forget to set executable on the file $chmod u+x bashtest.sh) Where bashtest.sh is the name of the script file.
#!/bin/bash
#List home directory (note the back ticks)
echo `ls -l ~`
#Store command output as a variable
i=`ls -l ~`
echo $i
#!/bin/bash
#List home directory (note the back ticks)
echo `ls -l ~`
#Store command output as a variable
i=`ls -l ~`
echo $i
Sunday, 26 October 2008
Ruby Gems & gem_server
The default Leopard Ruby installation does not include the gem_server by default.
NB: it is now called gem server (no underscore)
I performed a gem update then the gem server worked.
$ gem server
gems are Ruby libraries that add functionality to the basic install.
NB:
Some gems require you to build the documentation. in this case cd to the gem location and call
$rake docs
or
$rake rdocs
you can view a gems doc directly by pasting the gem docs folder into your web browser.
NB: it is now called gem server (no underscore)
I performed a gem update then the gem server worked.
$ gem update --system
$ gem server
gems are Ruby libraries that add functionality to the basic install.
NB:
Some gems require you to build the documentation. in this case cd to the gem location and call
$rake docs
or
$rake rdocs
you can view a gems doc directly by pasting the gem docs folder into your web browser.
Thursday, 23 October 2008
.bashrc history tips
Some usefiul lines in my .bashrc
#Reload Bashrc
alias reload='source ~/.bashrc'
#Save history correctly when using multiple terminals
# Dont save duplicate lines or blank lines in to history
export HISTCONTROL=ignoreboth
export HISTSIZE=1000
#Append changes to history instead of overwrite full file
alias exit='history -a && exit'
An alternative to the line above is
#Reload Bashrc
alias reload='source ~/.bashrc'
#Save history correctly when using multiple terminals
# Dont save duplicate lines or blank lines in to history
export HISTCONTROL=ignoreboth
export HISTSIZE=1000
#Append changes to history instead of overwrite full file
alias exit='history -a && exit'
An alternative to the line above is
# make it append, rather than overwrite the history
shopt -s histappend
Advantages of the alias exit it will group the output of each terminal in the history file, rather than a all terminals adding there input on the fly.
Wednesday, 22 October 2008
Linux Flickr command line(broken)
Installing a linux flickr command line uploader
http://micampe.it/projects/flickruploadr
$ cd ~/Bin
$ wget http://micampe.it/files/FlickrUploadr-1.0.0.tar.gz
$ tar -xvz FlickrUploadr-1.0.0.tar.gz
could not find the pyhton xmltramp package under apt get so had to manually add it
http://pypi.python.org/pypi/xmltramp/
$ cd /usr/lib/python2.5/site-packages/
$ sudo wget http://www.aaronsw.com/2002/xmltramp/xmltramp.py
Now to configure the uploader
$ cd ~/Bin/FlickrUploadr-1.0.0
$ sudo python setup.py install
Now Run Uploader
$ Uploadr
and WHOO Segmentation fault just what I wanted. But I was calling it from a no Xwindow terminal.
Any way my flickr page munkymorgy.net
http://micampe.it/projects/flickruploadr
$ cd ~/Bin
$ wget http://micampe.it/files/FlickrUploadr-1.0.0.tar.gz
$ tar -xvz FlickrUploadr-1.0.0.tar.gz
could not find the pyhton xmltramp package under apt get so had to manually add it
http://pypi.python.org/pypi/xmltramp/
$ cd /usr/lib/python2.5/site-packages/
$ sudo wget http://www.aaronsw.com/2002/xmltramp/xmltramp.py
Now to configure the uploader
$ cd ~/Bin/FlickrUploadr-1.0.0
$ sudo python setup.py install
Now Run Uploader
$ Uploadr
and WHOO Segmentation fault just what I wanted. But I was calling it from a no Xwindow terminal.
Any way my flickr page munkymorgy.net
Monday, 20 October 2008
MS Visio Block Connection Points
Friday, 10 October 2008
rtorrent Views
I just discover views in rtorrent. My favourite terminal torrent client.
Just pressing keys 1-7 will show different sorted/filtered lists of your torrents.
Original source http://linux.die.net/man/1/rtorrent
1: Main (sorted by name but new torrents are added to the bottom of the list)
2:Name (alphabetical I think)
3:Started (a filtered Name)
4:Stopped (a filtered Name)
5:Complete (a filtered Name)
6:Incomplete (a filtered Name)
7:Hashing (a filtered Name)
Just pressing keys 1-7 will show different sorted/filtered lists of your torrents.
Original source http://linux.die.net/man/1/rtorrent
1: Main (sorted by name but new torrents are added to the bottom of the list)
2:Name (alphabetical I think)
3:Started (a filtered Name)
4:Stopped (a filtered Name)
5:Complete (a filtered Name)
6:Incomplete (a filtered Name)
7:Hashing (a filtered Name)
Subscribe to:
Posts (Atom)