Skip to content

Instantly share code, notes, and snippets.

# Setup a git repo on dreamhost
ssh user@server.com
mkdir ~/git/my_app.git && cd ~/git/my_app.git
git --bare init
exit
cd my_app
git remote add origin user@server.com:git/my_app.git
git push origin master
@crofty
crofty / gist:718552
Created November 28, 2010 03:28
Show every dir taking up more than 1MB
du -h / | egrep "^[0-9].*[MG][[:space:]]" | more
@crofty
crofty / install.sh
Created January 17, 2011 08:31
Redis install for ubuntu 8.04 without upstart
# Redis install instructions for systems without upstart
mkdir ~/redis
cd ~/redis
wget --no-check-certificate http://github.com/antirez/redis/tarball/v2.0.0-rc4 -O redis_v2.0.0-rc4.tar.gz && tar --strip-components 1 -xzvf redis_v2.0.0-rc4.tar.gz
make
sudo mv redis-server /usr/local/bin/
sudo mv redis-cli /usr/local/bin/
sudo mv redis-benchmark /usr/local/bin/
sudo mv redis-check-dump /usr/local/bin/
sudo mkdir /var/lib/redis
@crofty
crofty / gist:785651
Created January 19, 2011 03:40
Install vim 7.3 on OSX
cd ~/src
wget ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2
tar -xvf vim-7.3.tar.bz2
cd vim73
CONF_OPT_RUBY=--enable-rubyinterp make
src/vim --version
sudo make install
@crofty
crofty / gist:858977
Created March 7, 2011 18:52
install vim via homebrew
brew install python
# Edit $PATH so it picks up python bins
easy_install mercurial
brew install https://raw.github.com/adamv/homebrew-alt/master/duplicates/vim.rb
@crofty
crofty / sproutcore_setup.mdown
Created June 15, 2011 20:17
Getting up and running with Sproutcore - 15/06/2011

Steps required for getting tests running

git clone git://github.com/sproutcore/sproutcore20.git
cd sproutcore20
echo "rvm use 1.9.2@sproutcore" > .rvmrc
cd -
cd sproutcore20
gem update --system 1.7.2
bundle install
gem uninstall spade # Version 0.1.0 isn't working for me yet
@crofty
crofty / gist:1135056
Created August 9, 2011 20:08
starting a project with bpm
gem install bpm --pre
bpm init bpm_test_project
cd bpm_test_project
bpm add jquery
bpm add sproutcore -v 2.0.beta.2.pre
{
"name": "orangetrack-js",
"bpm": "1.0.0",
"version": "0.0.1",
"dependencies": {
"spade": "~> 1.0",
"sensor-js-message-parsing": "~> 1.0"
},
"bpm:build": {
"bpm_libs.js": {
@crofty
crofty / memcached_
Created October 27, 2011 19:58
Memcached plugin for munin
#!/usr/bin/perl
# -*- cperl -*-
#
# Plugin to monitor memcache statistics
#
# This module has 3 seperate graph datasets:
# rates
# bytes
# counters
#
@crofty
crofty / gist:1364521
Created November 14, 2011 17:26
Start chrome with access to local files
open /Applications/Google\ Chrome.app --args -allow-file-access-from-files