Category Archives: Scripts

Upload to Rackspace Cloud Files in a shell script

I don’t really use much the GUI and always the command line so I don’t really use the Cloud File plugin I created for nautilus. So here is a shell script to upload to Rackspace Cloud Files and give you … Continue reading

Posted in Rackspace, Scripts | 2 Comments

rsync like backup to Rackspace Cloud File with duplicity

It seems that there is no much documentation about how to do rsync like backup with duplicty so here it is : Install python-cloudfiles from here http://github.com/rackspace/python-cloudfiles Install duplicity, its available directly from Debian or alike distros (ie: ubuntu) or … Continue reading

Posted in Rackspace, Scripts | 22 Comments

Upload to Rackspace Cloud files from GNOME nautilus

After seeing this script http://overhrd.com/?p=106 which allow to upload files with the file manager (finder) of MacosX to Rackspace Cloud Files, I have made a nautilus script that doe the same for us Gnome/Unix users. Available here : http://github.com/chmouel/nautilus-rackspace-cloud-file/tree/master

Posted in Programming, Rackspace, Scripts | Leave a comment

Using ProxyCommand with OpenSSH and a Bastion server.

So at work we have to use a bastion host for all our connections to servers to be able to get called PCI compliant. This kind of stuff could be a pain to use when you have to use another … Continue reading

Posted in Scripts | Leave a comment

Generating md5 encrypted password for chpasswd

If you want to generate properly encrypted password to feed to chpasswd, the most easier and proper way is to do that from command line : [code lang="bash"] echo "encryptedpassword"|openssl passwd -1 -stdin [/code] If you want to generate in … Continue reading

Posted in Programming, Python, Scripts, Solaris, Travel | 3 Comments

Automatic best resolution with xrandr

If you like me you have a big screen with your laptop and wants to automate when your X session start to get the best resolution, you can use that script : [code lang="bash"] #!/bin/bash function get_resolutions() { xrandr|while read … Continue reading

Posted in Life, Scripts | Leave a comment

Automate SSH known_hosts cleanup

If you like me, you have to do a lot of installs[1] of the same test machine with the same IP and have to ssh it you will notice this annoying message : IT IS POSSIBLE THAT SOMEONE IS DOING … Continue reading

Posted in Scripts | 5 Comments

SVN Diff against changes in the remote repository.

A useful svn wrapper scripts. Get a diff of your local repostitory against the upstream repository changes. I wonder why it is not builtins though like a svn status -u but for dif. #!/bin/bash   IFS=" " for line in … Continue reading

Posted in Scripts | 3 Comments

History expansion and substitions in ZSH

I better to keep that somewhere since i always forget that thing, to do a search and replace from the command line in zsh. you just have to do the :s^FOO^BAR after your expansion For example you just have typed … Continue reading

Posted in Scripts | Leave a comment

Get size of Postgres DB from filesystem

Get the size accurately from postgres local filesystem, i guess there is some sql stuff that can do that but that does the job as well for me : #!/bin/bash /usr/lib/postgresql/8.1/bin/oid2name -U postgres|while read -a e;do name=${e[1]} oid=${e[0]} [[ $oid … Continue reading

Posted in Scripts, postgres | Leave a comment