Skip to content

Instantly share code, notes, and snippets.

View gnuyoga's full-sized avatar

Sreekandh B gnuyoga

View GitHub Profile

Keybase proof

I hereby claim:

  • I am gnuyoga on github.
  • I am gnuyoga (https://keybase.io/gnuyoga) on keybase.
  • I have a public key ASAWBRYIB4HZOsSoKSRaQPMmiAcUPQvWBFgYa1_qYGQ-NAo

To claim this, I am signing this object:

@gnuyoga
gnuyoga / picasa command line backup script
Created July 25, 2013 10:06
Google picasa command line backup script
#!/bin/bash
# to install
# python 2.7 above
# install http://code.google.com/p/gdata-python-client/
# install http://code.google.com/p/googlecl/downloads/list
#
# once the above pacakges are installed you should be able to run the following
# you will have to authorize this machine before you can sucessfully run the same.
google picasa list-album > FILENAME
#
@gnuyoga
gnuyoga / EC2_URL
Created September 23, 2012 14:04
aws custom metrics
Region Endpoint Protocol
US East (Northern Virginia) ec2.us-east-1.amazonaws.com HTTP and HTTPS
US West (Oregon) ec2.us-west-2.amazonaws.com HTTP and HTTPS
US West (Northern California) ec2.us-west-1.amazonaws.com HTTP and HTTPS
EU (Ireland) ec2.eu-west-1.amazonaws.com HTTP and HTTPS
Asia Pacific (Singapore) ec2.ap-southeast-1.amazonaws.com HTTP and HTTPS
Asia Pacific (Tokyo) ec2.ap-northeast-1.amazonaws.com HTTP and HTTPS
South America (Sao Paulo) ec2.sa-east-1.amazonaws.com HTTP and HTTPS
# install fsarchiver
# In Fedora/RedHat system's :: yum install fsarchiver sfdisk dd
# In Debian/Ubuntu System :: apt-get install fsarchiver sfdisk dd
DEVICE_TO_BACKUP=/dev/sdb # assuming /dev/sda is where you have booted ur primary OS
mkdir ./backup_with_fsarchiver # create a directory
cd ./backup_with_fsarchiver # enter into newly created directory
# only get the first 512 bytes # read mbr in wiki for more details
dd if=$DEVICE_TO_BACKUP of=mbr count=1 bs=512
sfdisk -d $DEVICE_TO_BACKUP > partition.sfdisk