So you have a document like this:
<!DOCTYPE html>
<html>
<head></head>
<body>
<textarea id="myText"></textarea>
</body>
</html>
// This is a manifest file that'll be compiled into application.js, which will include all the files | |
// listed below. | |
// | |
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, | |
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. | |
// | |
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the | |
// compiled file. | |
// | |
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD |
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'terminal-table' | |
require 'json' | |
require 'hashie' | |
require 'csv' | |
data = Hashie::Mash.new JSON.parse(ARGF.read) | |
CSV.open('uvr.csv', 'w') do |csv| |
So you have a document like this:
<!DOCTYPE html>
<html>
<head></head>
<body>
<textarea id="myText"></textarea>
</body>
</html>
[user] | |
name = Bob Breznak | |
email = bob@where.com | |
[alias] | |
co = checkout | |
st = status | |
ci = commit | |
com = commit | |
di = diff |
class Address < ActiveRecord::Base | |
belongs_to :contact | |
validates_presence_of :street, :town | |
end |
You'll need to change the permissions for /usr/local for your local user.
sudo chown -R
whoami /usr/local
The easiest way to get everything setup is to use Homebrew. To do this, you'll need to first install XCode from the standard XCode from Apple Developer site. Afterwards you can just install Homebrew though its normal installation
ruby -e "$(curl -fsSLk https://gist.github.com/raw/323731/install_homebrew.rb)"
ActiveRecord::Schema.define(:version => 20110514135759) do | |
create_table "beers", :force => true do |t| | |
t.string "name" | |
t.string "brewery" | |
t.float "abv" | |
t.text "description" | |
t.string "image_url" | |
t.datetime "created_at" | |
t.datetime "updated_at" |
# http://henrik.nyh.se/2008/12/git-dirty-prompt | |
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/ | |
# username@Machine ~/dev/dir[master]$ # clean working directory | |
# username@Machine ~/dev/dir[master*]$ # dirty working directory | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" |