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
<?php | |
$url = 'http://letsrevolutionizetesting.com/challenge?id=756775492'; | |
do { | |
echo "following the json\n"; | |
$json = file_get_contents($url . '&format=json'); | |
$data = json_decode($json); | |
$url = isset($data->follow) ? $data->follow : NULL; | |
} while ( isset($data->follow) ); |
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 'rubygems' | |
require 'mechanize' | |
a = Mechanize.new { |agent| | |
agent.follow_meta_refresh = true | |
agent.pluggable_parser.pdf = Mechanize::FileSaver | |
} | |
a.get('https://manage.slicehost.com/') do |home_page| | |
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 | |
# This script is pretty fragile in that it will break if the UTCS | |
# lab status page changes its HTML in a fairly small way. So far, | |
# it works great. | |
# It requires nokogiri (gem install nokogiri). | |
# I have my user name set automatically with my ssh-config file, so | |
# it doesn't figure into the ssh command below. Later, I might either |
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
# based on http://pastie.org/230805 | |
# and http://gist.github.com/3829/ | |
# from http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/ | |
_bold=$(tput bold) | |
_normal=$(tput sgr0) | |
__vcs_dir() { | |
local vcs base_dir sub_dir ref |
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
class Polynomial | |
def initialize array | |
if array.length < 2 | |
raise ArgumentError.new('Need at least 2 coefficients') | |
exit | |
end | |
@result = '' |