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 'zeus/rails' | |
class Fixnum | |
def to_json(options = nil) | |
to_s | |
end | |
end | |
class CustomPlan < Zeus::Rails | |
def test |
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 | |
# Bootstrap chef-solo on a server | |
# Install Ruby | |
sudo apt-get install ruby ruby-dev libopenssl-ruby rdoc ri irb build-essential wget ssl-cert curl | |
# Install RubyGems instead of using the system version | |
cd /tmp | |
curl -O http://production.cf.rubygems.org/rubygems/rubygems-1.8.10.tgz | |
tar zxf rubygems-1.8.10.tgz |
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
SALE RECEIPT | |
Store #11476 eat 01/07/10 16:01:48 | |
Subway Sandwiches & Salads | |
609 N MILPAS ST | |
MILPAS CA 93103 | |
805-966-3001 | |
Trans# 137 Clerk 3 RAJVINDERPAL | |
Dwr1 TRDT 010710 Reg-ID REG-MAIN | |
Receipt # 0000103913 | |
--- ITEM --- QTY PRICE MEMO PLU |
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
function! RenameFile() | |
let old_name = expand('%') | |
let new_name = input('New file name: ', expand('%')) | |
if new_name != '' && new_name != old_name | |
exec ':saveas ' . new_name | |
exec ':silent !rm ' . old_name | |
redraw! | |
endif | |
endfunction | |
map <leader>n :call RenameFile()<cr> |
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 | |
NUMLINES=$(cat "$1" | | |
sed '{ | |
# Ignore the "References #blah" line | |
/^References \#[0-9]*/d | |
# Remove blank lines | |
/^$/d | |
# Remove lines containing only whitespace | |
/^[ \t]*$/d |
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 ruby | |
require 'rubygems' | |
require 'chef' | |
require 'chef/client' | |
require 'chef/run_context' | |
Chef::Config[:solo] = true | |
Chef::Config[:log_level] = :info | |
Chef::Log.level(:info) |
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
# Current | |
$ ant build | |
Buildfile: /Users/andrewle/Projects/html5-boilerplate/build/build.xml | |
build: | |
[echo] Building a Production Environment... | |
-rev: | |
[echo] Increasing the build number... |
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
Buildfile: /Users/andrewle/Projects/html5-boilerplate/build/build.xml | |
build: | |
[echo] Building a Production Environment... | |
-rev: | |
[echo] Increasing the build number... | |
[propertyfile] Updating property file: /Users/andrewle/Projects/html5-boilerplate/build/config/buildinfo.properties | |
[echo] Creating build 0009 |
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
" Lifted from http://vim.wikia.com/wiki/Xterm256_color_names_for_console_Vim | |
" and cleaned up alignment for for easy reference. Posted here so I can find | |
" this easily. //Andrew Le | |
" Generated from c:/pdsrc/xterm-222/256colres.h by allcolors.pl | |
" Xterm can display text in 256 colors, but it is hard to determine what all | |
" those colors are. So below is a list of the approximate names for the 256 | |
" default colors in xterm. You can put it in your vimrc or just use it as a | |
" reference when in doubt. |
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
<html> | |
<script> | |
function IsNewBrowser() | |
{ | |
var isIE = navigator.appName.indexOf("Microsoft") != -1; | |
var isNav = navigator.appName.search(/Netscape/i) != -1; | |
var ver = parseInt(navigator.appVersion); | |
if(isIE || (isNav && ver >=5) ) | |
return true ; | |
return false ; |