This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Let's back up just in case | |
sudo mv /var/lib/mysql /var/lib/mysql-saved | |
#replace your /etc/apt/sources.list with the lines below: (beetween BEGIN/END) | |
#---BEGIN | |
deb http://ftp.us.debian.org/debian/ wheezy main | |
deb-src http://ftp.us.debian.org/debian/ wheezy main | |
deb http://security.debian.org/ wheezy/updates main | |
deb-src http://security.debian.org/ wheezy/updates main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Make sure github is trusted prior to running this | |
# ssh github.com | |
#Usage wget --no-check-certificate -O - https://gist.github.com/lsaffie/5259be3fd24008ebb7db/raw/hsdevbox |bash | |
#using dotdeb | |
echo 'deb http://packages.dotdeb.org wheezy all' | sudo tee --append /etc/apt/sources.list | |
echo 'deb-src http://packages.dotdeb.org wheezy all' | sudo tee --append /etc/apt/sources.list | |
sudo apt-get update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Make sure github is trusted prior to running this | |
# ssh github.com | |
#Usage wget --no-check-certificate -O - https://gist.github.com/lsaffie/5259be3fd24008ebb7db/raw/hsdevbox |bash | |
apt-get update | |
echo "base packages" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DBUSER="root" | |
DBPASS="" | |
DBNAME="dbname" | |
array=( a b c ) | |
for i in "${array[@]}" | |
do | |
echo $i | |
mysql -u$DBUSER $DBNAME -p$DBPASS -e "select count(*) from $i" | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#bash script to setup rbenv in one shot. | |
#And as a bonus, I've thrown in bundler | |
sudo apt-get -y install git-core curl | |
curl https://raw.github.com/fesplugas/rbenv-installer/master/bin/rbenv-installer | bash | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'mail' | |
def create_observations(file) | |
#Here's were we create observations based on the file | |
end | |
Mail.defaults do | |
retriever_method :pop3, :address => "pop.gmail.com", | |
:port => 995, | |
:user_name => "email@gmail.com", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
if ARGV.size != 2 | |
puts "Usage: #{$0} <from_language> <to_language>" | |
exit -1 | |
end | |
require 'rubygems' | |
require 'ya2yaml' # this gem is needed for this to work! | |
require 'yaml' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# One stop-shop to install rbenv, friends and ruby 1.9.3 | |
# Author: Luis Saffie <luis@saffie.ca> | |
# USAGE: curl https://gist.github.com/lsaffie/6258406/raw/rbenv-ubuntu-install |bash | |
echo "=========================" | |
echo "remove rvm" | |
echo "=========================" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#author: Luis Saffie <luis@saffie.ca> | |
#url: www.saffie.ca | |
#twitter: lsaffie | |
# | |
#tmux1.8 has some great features. One of them is pane zooming.. | |
#http://blog.sanctum.geek.nz/zooming-tmux-panes/ | |
#however, tmux 1.8 depends on libevent2 which does not come with 10.04 | |
#solution: build from scratch! | |
#NOTE: LDFLAGS is used to build tmux because for some reason it can't find the ld_libs from libevent2.. Everything done by this script is legit thought... | |
#USAGE: wget -O - https://gist.github.com/lsaffie/6335957/raw/tmux18-ubuntu-10-04 |bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PATH="$HOME/.rbenv/bin:$PATH" | |
eval "$(rbenv init -)" | |
source $HOME/.bashrc | |
# Pimp out my prompt | |
NOCOLOR="\[\033[0m\]" | |
LOCALHOST="localhost" | |
BAR="----" | |
BLK="\[\033[0;30m\]" ; BLK1="\[\033[1;30m\]" #dark grey |
OlderNewer