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
# via https://gist.github.com/419201#file_gitconfig.bash | |
# Install (from Matt's gist) these useful Git aliases & configurations with the following command: | |
# $ bash <(curl -s https://raw.github.com/gist/419201/gitconfig.bash) | |
git config --global color.ui auto # colorize output (Git 1.5.5 or later) | |
git config --global color.interactive auto # and from 1.5.4 onwards, this will works: | |
echo "Set your name & email to be added to your commits." | |
echo -n "Please enter your name: " |
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
➜ ~ rvm use jruby | |
Using /Users/yarinb/.rvm/gems/jruby-1.6.4 | |
➜ ~ which jirb (jruby-1.6.4) | |
/Users/yarinb/.rvm/rubies/jruby-1.6.4/bin/jirb | |
➜ ~ jirb (jruby-1.6.4) | |
Object.new | |
Object.new | |
#<Object:0x62565cf8> | |
1+1 | |
1+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
# This loads some niceties for irb, courtesy of rvm. | |
# It also loads your custom ~/.irbrc if it exists. | |
# If you want to customize the irbrc for ONLY this version of | |
# ruby then edit this file. It will only be deleted if you do | |
# an "rvm install" over this ruby version. | |
if ENV["rvm_path"].nil? | |
require File.join(ENV["HOME"], "irbrc") | |
else |
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
# Update, upgrade and install development tools: | |
apt-get update | |
apt-get -y upgrade | |
apt-get -y install build-essential | |
apt-get -y install git-core | |
# Extras for RubyGems and Rails: | |
apt-get -y install zlib1g-dev | |
apt-get -y install libssl-dev libsqlite3-dev | |
apt-get -y install libreadline5-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
bash -c ' | |
<% if knife_config[:bootstrap_proxy] -%> | |
( | |
cat <<'EOP' | |
<%= "proxy = #{knife_config[:bootstrap_proxy]}" %> | |
EOP | |
) > ~/.curlrc | |
<% end -%> | |
if [ ! -f /usr/bin/chef-client ]; then |
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
# This configuration file works with both the Compass command line tool and within Rails. | |
# Require any additional compass plugins here. | |
project_type = :rails | |
sass_options = {:debug_info => true} | |
# Set this to the root of your project when deployed: | |
http_path = "/" | |
# You can select your preferred output style here (can be overridden via the command line): |
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
{ | |
"jobs":[ | |
{ | |
"jobname":"ServerPingJob.groovy", | |
"period":5, | |
"timeUnit":"SECONDS", | |
"jobMode":"ASYNCHRONOUS", | |
"disabled":true, | |
"params":[ | |
{ |
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
require "reactor" | |
require "net" | |
local buffer = {} | |
local server = net:server(function(c) | |
print("connected", c) | |
c:on("end", function() | |
print("disconnected") | |
end) |
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
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
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
class User < ActiveRecord::Base | |
attr_accessible :name | |
has_many :bookings | |
has_many :events, :through => :bookings | |
end | |
class Event < ActiveRecord::Base | |
attr_accessible :title |
OlderNewer