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
set nocompatible "don't need to keep compatibility with Vi | |
filetype plugin indent on " enable detection, plugins and indenting in one step | |
syntax on "Turn on syntax highlighting | |
set background=dark "make vim use colors that look good on a dark background | |
set showcmd "show incomplete cmds down the bottom | |
set showmode "show current mode down the bottom |
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
# Copyright 2011 Sam Elliott | |
# Released under MIT Licence | |
app_name = File.basename(Dir.pwd) | |
git :init | |
# Remove rails.png and index.html | |
remove_file("public/index.html") | |
remove_file("public/images/rails.png") | |
create_file("public/images/.gitkeep") |
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
From 6f174a93fdda24b0913f65734d0b36849910e3dc Mon Sep 17 00:00:00 2001 | |
From: Igor Anic <igor.anic@gmail.com> | |
Date: Wed, 25 May 2011 12:39:39 +0200 | |
Subject: [PATCH] initial commit of databse mirroring funcionality to the new repo | |
--- | |
.gitignore | 3 +- | |
MIRRORING_HOW_TO | 48 +++++++ | |
Rakefile | 14 ++- | |
.../connection_adapters/sqlserver/mirroring.rb | 85 +++++++++++++ |
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
source :rubygems | |
gem 'sinatra', '1.2.3' | |
gem 'tilt', "1.3" | |
gem 'rack', "1.2.2" | |
gem 'sinatra-respond_to', '0.7.0' |
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
export PATH="/opt/scala/bin:/opt/local/bin:/opt/local/sbin:/usr/local/mysql/bin:$PATH:/opt/local/lib/postgresql83/bin" | |
alias irb='irb --readline -r irb/completion -rubygems' | |
alias ss='ruby script/server' | |
alias sc='ruby script/console' | |
alias dir='ls -al' |
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
class PostsController < ActionController::Base | |
def create | |
Post.create(post_params) | |
end | |
def update | |
Post.find(params[:id]).update_attributes!(post_params) | |
end | |
private |
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/bash | |
# Formats a man page for reading in a browser, and opens it. Example: | |
# | |
# hman xsltproc | |
# | |
stylesheet=$(cat <<eocss | |
<?xml version="1.0" encoding="UTF-8"?> | |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> | |
<xsl:output method="html" encoding="UTF-8" indent="yes"/> |
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
// | |
// Example usage: phantomjs screenshot.js http://yahoo.com /tmp/yahoo.png | |
// | |
var system = require('system'); | |
var url = system.args[1]; | |
var filename = system.args[2]; | |
var page = new WebPage(); | |
page.open(url, function (status) { |
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
$ gem install nokogiri | pbcopy | |
ERROR: Error installing nokogiri: | |
ERROR: Failed to build gem native extension. | |
/Users/brianhogan/.rvm/rubies/ruby-1.8.7-p174/bin/ruby extconf.rb | |
checking for libxml/parser.h... no | |
----- | |
libxml2 is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies. | |
----- | |
*** extconf.rb failed *** |
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
# | |
brew tap homebrew/dupes | |
brew install apple-gcc42 | |
export CPPFLAGS=-I/opt/X11/include | |
rvm install 1.8.7 | |
rvm install 1.8.6 | |
rvm install 1.9.3 |