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
| Guacamole | |
| 2 avocados | |
| ½ tsp kosher salt | |
| several grinds of black pepper | |
| 2-3t fresh lime or lemon juice | |
| 1 roma tomato, chopped | |
| ¼ finely chopped onion (i prefer red) | |
| 4T chopped fresh cilantro leaves | |
| 1 jalapeno, seeded/deveined (1 chipotle or serrano are 2nd/3rd choices) |
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
| require 'fileutils' | |
| require 'awesome_print' | |
| def find_jars(revision, path) | |
| FileUtils.cd path | |
| puts %x{git checkout #{revision}} | |
| result = [] |
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/ruby | |
| require 'fileutils' | |
| HOME_DIR = '/Users/cfouts/' | |
| SNAP_DIR = HOME_DIR + 'Sandbox/snapcreator/' | |
| FRAME_DIR = SNAP_DIR + 'SC-Framework/' | |
| SERV_DIR = FRAME_DIR + 'server/' | |
| GUI_DIR = FRAME_DIR + 'GUI/' |
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
| require 'mechanize' | |
| require 'awesome_print' | |
| BASE = "http://www.trulia.com" | |
| PREFIX = "/for_sale/" | |
| PRICE = "215000-262000_price/" | |
| NL = "7_nl/" |
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
| require 'rest-client' | |
| require 'json' | |
| require 'pp' | |
| DEBUG = true | |
| TAB = " " | |
| HOST = 'https://api.github.com/' | |
| PORT = '443' |
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 class ReverseString { | |
| public static void main(String[] argv) { | |
| String origString = argv[0]; | |
| System.out.println(origString); | |
| System.out.println(reverse(origString)); | |
| } | |
| public static String reverse(String str){ | |
| char[] strAry = str.toCharArray(); |
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
| /** | |
| * NodeCircle is a demo class that implments a size N linked list of nodes. The | |
| * last node is then set to point to the first node creating a circular linked | |
| * list. The method removeEveryFifthNode then removes every fifth node starting | |
| * from the first node while maintaining the cicular linked list. | |
| */ | |
| public class NodeCircle | |
| { |
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
| require 'logger' | |
| require 'active_record' | |
| require 'awesome_print' | |
| # edit postgresql.conf, using /tmp/pg for testing | |
| # http://www.postgresql.org/docs/9.1/interactive/continuous-archiving.html | |
| # wal_level = archive | |
| # archive_mode = on | |
| # archive_command = 'test ! -f /tmp/pg/%f && cp %p /tmp/pg/%f' |
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
| require 'test/unit' | |
| require 'palindrome' | |
| require 'awesome_print' | |
| class PalindromeTest < Test::Unit::TestCase | |
| SAS_P = "sas" | |
| def setup | |
| 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
| # itunes_service.rb | |
| require 'sinatra' | |
| require 'json' | |
| require './applay' | |
| get '/music/play' do | |
| ItunesAppScript.new.play | |
| end |
NewerOlder