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
# Run this sample from root project: | |
# $ ruby samples/support_to_HAL.rb | |
require "rubygems" | |
$LOAD_PATH << "lib" | |
require "restfolia" | |
# HAL from http://stateless.co/hal_specification.html | |
json_hal = <<-JSON |
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 bash | |
# Apt-install various things necessary for Ruby, guest additions, | |
# etc., and remove optional things to trim down the machine. | |
apt_get_things() | |
{ | |
apt-get -y update | |
apt-get -y remove apparmor | |
apt-get -y install linux-headers-$(uname -r) build-essential | |
apt-get -y install zlib1g zlib1g-dev libxml2 libxml2-dev libxslt-dev libssl-dev openssl libreadline5-dev |
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 'rubygems' | |
require 'xmpp4r-simple' | |
# gem install xmpp4r-simple | |
include Jabber | |
#Jabber::debug = true | |
jid = 'email@gmail.com' | |
pass = 'secret' |
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
alias ls='ls -G' | |
# brew install bash-completion | |
if [ -f `brew --prefix`/etc/bash_completion ]; then | |
. `brew --prefix`/etc/bash_completion | |
fi | |
# Tell grep to highlight matches | |
export GREP_OPTIONS='--color=auto' |
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
[url "ssh://git-abril/repos/"] | |
insteadOf = abril-repo: | |
[user] | |
name = Roger Leite | |
email = roger.barreto+github@gmail.com | |
[core] | |
editor = gvim -f | |
[color] | |
diff = auto | |
interactive = auto |
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
(in /home/roger/dev/trivial/temp/raketest) | |
** Invoke test (first_time) | |
** Execute test | |
** Invoke test:units (first_time) | |
** Invoke test:prepare (first_time) | |
** Invoke db:test:prepare (first_time) | |
** Invoke db:abort_if_pending_migrations (first_time) | |
** Invoke environment (first_time) | |
** Execute environment | |
ENV LOADED ! |
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
"https://github.com/akitaonrails/vimfiles | |
"git://github.com/akitaonrails/vimfiles.git | |
source ~/.vim/vimrc | |
nnoremap <C-b> :BufExplorer<cr> | |
nnoremap <C-f> :CommandT<CR> | |
"disable visual bell for all platforms | |
if has("autocmd") && has("gui") |
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
# Database Utils for lazy programmers | |
namespace :db do | |
# Simple Mysql Dump Operations | |
namespace :dump do | |
def param_filename | |
filename = ENV["file"] || "db/dump/#{db[:database]}.sql" | |
filename = "#{Rails.root}/#{filename}" unless filename.starts_with?("/") | |
filename |
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
begin | |
require 'cucumber/rake/task' | |
Cucumber::Rake::Task.new(:cucumber) do |t| | |
t.cucumber_opts = "features --format pretty" | |
end | |
namespace :cucumber do | |
Cucumber::Rake::Task.new(:wip) do |t| | |
t.cucumber_opts = "features --format pretty -t @wip --wip" |
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
# This irb script enables: | |
# - irb completion. (Ex: "".[tab] show available methods) | |
# - commands history. Up and Down arrows to navigate at commands. | |
# - requires pretty print. | |
# - if "awesome print" gem is available, replace pp command for ap. | |
# - if RAILS_ENV exists, set irb console as logger. (I can see queries from ActiveRecord) | |
require 'irb/completion' | |
ARGV.concat [ "--readline", "--prompt-mode", "simple" ] |