Skip to content

Instantly share code, notes, and snippets.

debug = false
inFile = File.open("inFile", "r")
outFile = File.open("outFile", "w")
def satisfied(customer, flavors)
flavors.each_with_index.any? {|el,index| customer.has_key?(index) ? customer[index] == el : false}
end
def all_be_satisfied(customers, flavors)
1
5
3
1 1 1
2 1 0 2 0
1 5 0
$(function() {
// TODO: need to test education out before moving on to other sections
// A education item
window.myordo.EducationItem = Spine.Controller.sub({
events: {
'click .close': 'close',
"click .addConcentration": "addConcentration"
// This is a manifest file that'll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
//= require jquery
//= require jquery-ui
//= require jquery_ujs
//= require jquery_tipTip
class ResumesController < ApplicationController
before_filter :authenticate_user!
respond_to :pdf
def index
end
def preview
# Error Correction Capacity (ECC) level
# L - 7% of codewords can be recovered
@pencilcheck
pencilcheck / gist:1339626
Created November 4, 2011 15:42 — forked from mudge/gist:124170
Add vim Ruby syntax highlighting to .prawn files.
au BufNewFile,BufRead *.prawn set filetype=ruby
21905 execve("./gitweb.cgi.real", ["./gitweb.cgi.real"], [/* 15 vars */]) = 0
21905 brk(0) = 0x987f000
21905 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
21905 mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb76ee000
21905 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
21905 open("/etc/ld.so.cache", O_RDONLY) = 3
21905 fstat64(3, {st_mode=S_IFREG|0644, st_size=25623, ...}) = 0
21905 mmap2(NULL, 25623, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb76e7000
21905 close(3) = 0
21905 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
$ brew --config
HOMEBREW_VERSION: 0.8.1
HEAD: ad4d2a549440a6e86dd8d2b78db7329ec00f380c
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
Hardware: dual-core 64-bit penryn
OS X: 10.7.3
Kernel Architecture: x86_64
Xcode: 4.2
GCC-4.0: N/A
have_library: checking for main() in -lrsync... -------------------- yes
"/usr/bin/llvm-gcc -o conftest -I/usr/local/Cellar/ruby/1.9.2-p290/include/ruby-1.9.1/x86_64-darwin11.1.0 -I/usr/local/Cellar/ruby/1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/usr/local/Cellar/ruby/1.9.2-p290/include/ruby-1.9.1 -I. -I/usr/local/Cellar/readline/6.2.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/usr/local/Cellar/readline/6.2.1/include -O3 -march=core2 -msse4.1 -w -pipe -fno-common conftest.c -L. -L/usr/local/Cellar/ruby/1.9.2-p290/lib -L. -L/usr/local/Cellar/readline/6.2.1/lib -L/usr/local/lib -lruby.1.9.1-static -lpthread -ldl -lobjc "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main() {return 0;}
/* end */
require 'rubygems'
require 'bundler/setup'
require 'RRDiff'
require 'tempfile'
module RDiff
def rsync_signature
sig_file = Tempfile.new File.basename(self.path)
#sig_file.close