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
# Install with: | |
# bash < <(curl -L https://raw.github.com/gist/1333785) | |
# | |
# Reference: http://blog.wyeworks.com/2011/11/1/ruby-1-9-3-and-ruby-debug | |
echo "Installing ruby-debug with ruby-1.9.3-p194 ..." | |
curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem | |
curl -OL http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem |
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
# Install with: | |
# bash < <(curl -L https://raw.github.com/gist/2767174) | |
echo "Installing S3cmd..." | |
wget -O- -q http://s3tools.org/repo/deb-all/stable/s3tools.key | sudo apt-key add - | |
sudo wget -O/etc/apt/sources.list.d/s3tools.list http://s3tools.org/repo/deb-all/stable/s3tools.list | |
sudo apt-get update && sudo apt-get install s3cmd | |
echo "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
module Paperclip | |
#converts a string into a file for paperclip to save | |
# useage | |
# self.avatar = Paperclip::string_to_file('bob.png', 'image/png', 'BASE64 here') | |
def self.string_to_file(name, type, data) | |
image = StringIO.new(data) | |
image.class.class_eval { attr_accessor :original_filename, :content_type } | |
image.original_filename = name | |
image.content_type = type |
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
gconftool-2 --type=int --set /apps/compiz-1/general/screen0/options/vsize 3 | |
gconftool-2 --type=int --set /apps/compiz-1/general/screen0/options/hsize 3 |
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 'aws/s3' | |
require 'digest/md5' | |
require 'mime/types' | |
#load config yml | |
CONFIG = YAML.load_file("config/config.yml") | |
## These are some constants to keep track of my S3 credentials and | |
## bucket name. Nothing fancy here. |
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
# curl -L https://raw.github.com/gist/2978533 | bash | |
sudo -s | |
apt-get install python-software-properties | |
apt-add-repository ppa:chris-lea/node.js | |
apt-get update | |
apt-get install nodejs npm -y |
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
# curl -L https://raw.github.com/gist/2978560 | bash | |
# /etc/apt/sources.list.d/dotdeb.org.list | |
sudo -s | |
echo -e "deb http://packages.dotdeb.org stable all\ndeb-src http://packages.dotdeb.org stable all" > /etc/apt/sources.list.d/dotdeb.org.list | |
wget -q http://www.dotdeb.org/dotdeb.gpg -O- | apt-key add - | |
apt-get update | |
apt-get install redis-server |
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
# curl -L https://gist.github.com/raw/2978569 | bash | |
# setup your ssh keys for github | |
echo "Please enter your email: " | |
read email | |
ssh-keygen -t rsa -C "$email" | |
cat ~/.ssh/id_rsa.pub | |
cat ~/.ssh/id_rsa.pub | pbcopy | |
read -p "\n\nYour ssh public key has been copied to your clipboard. Add it to github and press any key to continue" |
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/sh | |
# | |
# init.d script with LSB support. | |
# | |
# Copyright (c) 2007 Javier Fernandez-Sanguino <[email protected]> | |
# | |
# This is free software; you may redistribute it and/or modify | |
# it under the terms of the GNU General Public License as | |
# published by the Free Software Foundation; either version 2, | |
# or (at your option) any later version. |
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
# Redis configuration file example | |
# Note on units: when memory size is needed, it is possible to specifiy | |
# it in the usual form of 1k 5GB 4M and so forth: | |
# | |
# 1k => 1000 bytes | |
# 1kb => 1024 bytes | |
# 1m => 1000000 bytes | |
# 1mb => 1024*1024 bytes | |
# 1g => 1000000000 bytes |
OlderNewer