Copy/paste in Terminal:
bash <(curl -s https://gist.githubusercontent.com/msadouni/5ede20cd671c61f29a5a/raw/0809fbc358420d45071014fcb3b63e08ba09daf0/gistfile1.sh)
#!/bin/bash | |
if [ -z "$1" ] | |
then | |
echo "usage: git-export <project-name> <branch-name|master>" | |
exit | |
fi | |
site_name=$1 | |
if [ -z "$2" ] |
#!/bin/bash | |
export_to='/path/to/export/without/slash' | |
login='login' | |
server='server.com' | |
root='/path/to/app/without/slash' | |
rm -rf $export_to | |
git checkout-index -a --prefix=$export_to/ | |
rsync -avz -e ssh $export_to/ $login@$server:$root --exclude-from 'exclude.rsync' |
#!/bin/sh | |
# Usage: git-branch-backup.sh <remote> | |
# Originally from jlecour but I can't find his version anymore | |
if [ -z "$1" ] | |
then | |
remote='origin' | |
else | |
remote=$1 | |
fi |
rails_admin | |
bullet | |
sidekiq | |
devise-async | |
display-case | |
decent_exposure | |
virtus | |
wicked | |
apartment | |
yell |
Copy/paste in Terminal:
bash <(curl -s https://gist.githubusercontent.com/msadouni/5ede20cd671c61f29a5a/raw/0809fbc358420d45071014fcb3b63e08ba09daf0/gistfile1.sh)
#!/bin/bash | |
sudo echo "LoadModule php5_module /usr/lib/apache2/modules/libphp5.so" > /tmp/php5.load | |
sudo ln -nfs /vagrant/templates/default /etc/apache2/sites-available/default | |
sudo ln -nfs /tmp/php5.load /etc/apache2/mods-enabled/php5.load | |
sudo service apache2 restart | |
find /vagrant -type f -name "*.default" | while read file | |
do | |
cp $file ${file%.*} | |
done |
I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.
If you want to roll up all of these into a single jQuery plugin check out Sharrre
Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.