This file contains hidden or 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
echo "base packages" | |
sudo apt-get -y install curl libncurses-dev libgnome2-dev \ | |
libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev \ | |
libx11-dev libxpm-dev libxt-dev ruby-dev memcached build-essential openssl libssl-dev python | |
export DEBIAN_FRONTEND=noninteractive | |
sudo apt-get -q -y install mysql-server mysql-client libmysqlclient-dev | |
# ruby developer packages |
This file contains hidden or 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/7683731/raw/hs-bootstrap-ec2 |bash | |
sudo apt-get update | |
echo "base packages" | |
sudo apt-get -y install curl libncurses-dev libgnome2-dev \ | |
libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev \ |
This file contains hidden or 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "homestars-devbox-vagrant" | |
config.vm.network :private_network, ip: "10.0.0.100" |
This file contains hidden or 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
#VM name | |
config.vm.box = "homestars-devbox-vagrant" |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 | |
# Place this in <project_name>/.git/hooks/prepare-commit-msg | |
git branch | sed -n '/\* /s///p' >> $1 |
This file contains hidden or 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
%h1 Tmux cheatsheet | |
https://github.com/lsaffie/tmux | |
Prefix: | |
<pre><code>ctrl+a</code></pre> | |
Moving aroud: | |
right: | |
<pre><code>ctrl+a + l</code></pre> |