Skip to content

Instantly share code, notes, and snippets.

@payneio
payneio / spabs.sh
Last active November 2, 2015 19:42
Expand Go tabs to spaces
#!/bin/bash
find . -name '*.go' ! -type d -exec bash -c 'expand -t 4 "$0" > /tmp/e && mv /tmp/e "$0"' {} \;
@payneio
payneio / deploy
Last active August 29, 2015 14:10
rsync bash file for simple deployment of static files via ssh
#!/bin/bash
# This deploy script uses rsync with the following configuration:
#
# - Connection variables are read from .deploy.env. That file should set host, username and www_path environment variables.
# - Ignore local files (don't copy them) specified in .deployignore
# - All remote files not existing locally are deleted, except for the remote /share directory.
#
# set host, username and www_path in this non-source-controlled file (use ssh keys to avoid passwords)
@payneio
payneio / Installing eclipse-java-indigo on Ubuntu
Created April 5, 2012 17:39
Installing eclipse-java-indigo on Ubuntu
sudo -s
cd /opt
wget http://download.springsource.com/release/ECLIPSE/indigo/SR2/eclipse-java-indigo-SR2-linux-gtk-x86_64.tar.gz
tar -xzf eclipse<tab>
rm eclipse-java-<tab>
chown -R root:root eclipse
chmod -R +r eclipse
chmod +x `sudo find eclipse -type d`