This file contains hidden or 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
%PDF-1.4 | |
% | |
1 0 obj | |
<</Type /XObject | |
/Subtype /Image | |
/Width 1728 | |
/Height 2200 | |
/BitsPerComponent 1 | |
/ColorSpace /DeviceGray | |
/Filter /CCITTFaxDecode |
This file contains hidden or 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
[email protected] do |content| | |
%pre | |
%code | |
=JSON.pretty_generate(JSON[content.content])``` |
This file contains hidden or 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 'pivotal-tracker' | |
require 'yaml' | |
TEMP_DIR = "#{ENV['HOME']}/.pivotal/" | |
TEMP_FILE = TEMP_DIR + "temp.yml" | |
CONFIG_FILE = TEMP_DIR + "config.yml" | |
unless File.directory? TEMP_DIR |
This file contains hidden or 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
// | |
// main.cpp | |
// 3 | |
// | |
// Created by Chintan Parikh on 5/28/13. | |
// Copyright (c) 2013 Chintan Parikh. All rights reserved. | |
// | |
#include <iostream> |
This file contains hidden or 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
module FormHelper | |
def phone_number_tag *args | |
args.each do |e| | |
if e.is_a? Hash and e.has_key? :class | |
e[:class] = e[:class] + " phone_number" | |
elsif e.is_a? Hash | |
e[:class] = "phone_number" | |
end | |
end | |
debugger |
This file contains hidden or 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
let(:referrals) { create_list(:referral, 31, :with_sent_referrals) } | |
before(:all) do | |
referrals | |
end |
This file contains hidden or 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
Chintan at mbp in ~/Documents/Work/Aidin on master | |
± gem install capybara-webkit -v '0.14.1' | |
Building native extensions. This could take a while... | |
ERROR: Error installing capybara-webkit: | |
ERROR: Failed to build gem native extension. | |
/Users/Chintan/.rvm/rubies/ruby-1.9.3-p0/bin/ruby extconf.rb | |
cd src/ && /usr/local/bin/qmake /Users/Chintan/.rvm/gems/ruby-1.9.3-p0/gems/capybara-webkit-0.14.1/src/webkit_server.pro -spec /usr/local/Cellar/qt/4.8.4/mkspecs/macx-g++ -o Makefile.webkit_server | |
cd src/ && make -f Makefile.webkit_server | |
g++ -c -pipe -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Cellar/qt/4.8.4/mkspecs/macx-g++ -I. -I/usr/local/Cellar/qt/4.8.4/lib/QtCore.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.4/lib/QtCore.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.4/lib/QtNetwork.framework/Versions/4/Headers -I/usr/local/Cellar/qt/4.8.4/lib/QtNetwork.framework |
This file contains hidden or 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
out = File.new('out.txt', 'w') | |
File.open('emails.html').read.scan(/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i).uniq.each { |e| out.print(e + ", ") } |
This file contains hidden or 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
public static Map<Character, EncodedString> mergeMaps(Map<Character, EncodedString> left, Map<Character, EncodedString> right) | |
{ | |
Map<Character, EncodedString> merged = new HashMap<Character, EncodedString>(); | |
merged.putAll(left); | |
merged.putAll(right); | |
return merged; | |
} |
This file contains hidden or 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
public static Map<Character, EncodedString> buildEncodingMap(Node tree) { | |
return buildEncodingMap(tree, new EncodedString()); | |
} | |
public static Map<Character, EncodedString> buildEncodingMap(Node node, EncodedString string) | |
{ | |
if (node.character != 0) | |
{ | |
// The node has a character, frequency mapping | |
HashMap<Character, EncodedString> map = new HashMap<Character, EncodedString>(); |