Skip to content

Instantly share code, notes, and snippets.

View premasagar's full-sized avatar

Prem Rose premasagar

View GitHub Profile
#!/bin/sh
perl Makefile.PL
make
make test
sudo make install
@premasagar
premasagar / git2tar.sh
Created March 29, 2010 15:15
Export an archive of a Git repository as a .tar file
#!/bin/sh
git archive master | tar -x -C ../exportDirectory
cd ../exportDirectory
tar -zcvf projectName.tar.gz projectName
@premasagar
premasagar / google-chrome-restore.sh
Created March 29, 2010 10:29
Restore Google Chrome on Linux (Ubuntu), when it starts with "Could not restore your profile"
#!/bin/sh
# Restore Google Chrome on Linux (Ubuntu), when it
# starts with "Could not restore your profile"
# $ ./google-chrome-restore.sh
rm -rf ~/.config/google-chrome/Backup
mv ~/.config/google-chrome/Default ~/.config/google-chrome/Backup
rm -rf ~/.config/google-chrome/Default
cp -R ~/.config/google-chrome/Backup ~/.config/google-chrome/Default
rm -rf ~/.config/google-chrome/Backup
@premasagar
premasagar / Esc key trapping
Created March 20, 2010 15:13
Trap 'Esc' key
$(document).keydown(function(ev){
if (ev.which === 27){ // ESC key
close();
});