Skip to content

Instantly share code, notes, and snippets.

@ncimino
ncimino / add_bp_css.sh
Created September 6, 2012 04:30
Add blueprint css to a ruby project
#!/bin/sh
# expects:
# add_bp_css.sh my_rails_project
pushd ${HOME}
git clone git@github.com:joshuaclayton/blueprint-css
cd blueprint-css/lib
sudo bundle install --without test
ruby compress.rb -o ${HOME}/$1/app/assets/stylesheets
@ncimino
ncimino / tarit.sh
Created September 24, 2012 22:46
Compress Directory and Contents - tar
#!/bin/sh
# Expects /path/to/dir_name
tar -czf `basename ${1}`.tar.gz ${1}
@ncimino
ncimino / untarit.sh
Created September 24, 2012 22:49
Extract File - tar
#!/bin/sh
# Expects dir_name.tar.gz
tar -xzf ${1}
@ncimino
ncimino / listtar.sh
Created September 24, 2012 22:53
List Archive Contents - tar
#!/bin/sh
# Expects dir_name.tar.gz
tar -tzf ${1}
@ncimino
ncimino / getos.sh
Created September 24, 2012 22:54
Get Linux Distribution Information / OS Version
#!/bin/sh
cat /etc/*release
@ncimino
ncimino / dirsize.sh
Created September 24, 2012 22:56
Check Directory Size
#!/bin/sh
# Expects /path/to/dir_name
du -sh ${1}
@ncimino
ncimino / subdirsize.sh
Created September 24, 2012 22:58
Check Sub-directory Size
#!/bin/sh
# Expects /path/to/dir_name
du -sh ${1}/*
@ncimino
ncimino / whichmount.sh
Created September 24, 2012 23:00
Check which machine a directory is mounted to
#!/bin/sh
# Expects /path/to/dir_name
df ${1}
@ncimino
ncimino / ls30.sh
Created September 24, 2012 23:01
List Files Older than 30 days
#!/bin/sh
# Expects /path/to/dir_name
find ${1} -ls -mtime +30 -maxdepth 1
@ncimino
ncimino / .bashrc
Created September 25, 2012 16:02
My .bashrc configuration
# .bashrc
# Remember to:
# cd ~
# wget https://raw.github.com/git/git/master/contrib/completion/git-prompt.sh -O .git-prompt.sh
# wget https://raw.github.com/git/git/master/contrib/completion/git-completion.bash -O .git-completion.sh
alias rm='rm -i'
alias cp='cp -i'