Skip to content

Instantly share code, notes, and snippets.

View iamjwc's full-sized avatar

Justin Camerer iamjwc

  • LimeWire, LLC
  • New York City
View GitHub Profile
# Controller
class GuestsController < ApplicationController
def create
@guest = Guest.new(params[:guest])
if @guest.save
redirect_to :action => 'index'
else
render :action => 'new'
end
export TERM="xterm-color"
alias ls="ls -G"
WHITE="\[\033[0;37m\]"
DARK_GREY="\[\033[0;30m\]"
LIGHT_BLUE="\[\033[0;34m\]"
LIGHT_GREEN="\[\033[0;32m\]"
export PS1="\n$DARK_GREY[$LIGHT_BLUE\w$DARK_GREY]$LIGHT_GREEN\$ $WHITE"
class BTree
attr_reader :order
class Node
attr_reader :keys, :values, :branches
def initialize(order, values = {})
@order = order
@keys = values.keys.sort
command GrepWord :execute 'grep -r --exclude=metrics/coverage/* --exclude=*.log --exclude=*.*-base --exclude=vendor/* --exclude=*.tmp '.expand('<cword>').' *' | :copen | :cc
nnoremap <c-j> :cnext<CR> :norm! zz<cr>
nnoremap <c-k> :cprev<CR> :norm! zz<cr>
nnoremap <c-n> :tabnew<CR>
nnoremap <c-l> :tabnext<CR>
nnoremap <c-h> :tabprev<CR>
[~]$ ruby -e "require 'rubygems'; require 'sinatra'"
/Library/Ruby/Site/1.8/rubygems.rb:578:in `report_activate_error': Could not find RubyGem memcache-client (>= 0) (Gem::LoadError)
from /Library/Ruby/Site/1.8/rubygems.rb:134:in `activate'
from /Library/Ruby/Site/1.8/rubygems.rb:158:in `activate'
from /Library/Ruby/Site/1.8/rubygems.rb:157:in `each'
from /Library/Ruby/Site/1.8/rubygems.rb:157:in `activate'
from /Library/Ruby/Site/1.8/rubygems.rb:158:in `activate'
from /Library/Ruby/Site/1.8/rubygems.rb:157:in `each'
from /Library/Ruby/Site/1.8/rubygems.rb:157:in `activate'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
class CreateAccountsComponents < ActiveRecord::Migration
def self.up
create_table :themes do |t|
t.integer :account_id
t.string :name
t.string :default_processing_message
t.string :standalone_header_image
t.string :standalone_background_color
t.string :validation_icon
t.string :custom_validation_icon
diff --git a/.LinkedList.h.swp b/.LinkedList.h.swp
deleted file mode 100644
index e442d92..0000000
Binary files a/.LinkedList.h.swp and /dev/null differ
diff --git a/.Queue.h.swp b/.Queue.h.swp
deleted file mode 100644
index 008843e..0000000
Binary files a/.Queue.h.swp and /dev/null differ
diff --git a/Behavior.h b/Behavior.h
index c3ca111..a497059 100755
<?xml version="1.0" encoding="iso-8859-1"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<style>
div {
height: 1000px;
}
body {
background-color: #eaeaea;
<!doctype html>
<html>
<head>
<title></title>
<!-- Meta Info -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
// [~]$ g++ isLocalhost.cpp -o isLocalhost && ./isLocalhost 127.0.0.1 google.com localhost
// isSlocalhost(127.0.0.1) = 1
// isSlocalhost(google.com) = 0
// isSlocalhost(localhost) = 1
// isLocalhost(127.0.0.1) = 1
// isLocalhost(google.com) = 0
// isLocalhost(localhost) = 1
#include <netdb.h>