This is the sequence of steps to follow to create a root gh-pages branch. It is based on a question at [SO]
cd /path/to/repo-name
git symbolic-ref HEAD refs/heads/gh-pages
rm .git/index
git clean -fdx
echo "My GitHub Page" > index.html
| def select_from_chosen(item_text, options) | |
| field = find_field(options[:from]) | |
| option_value = page.evaluate_script("$(\"##{field[:id]} option:contains('#{item_text}')\").val()") | |
| page.execute_script("$('##{field[:id]}').val('#{option_value}')") | |
| end |
| # (v.respond_to?(:empty?) ? v.empty? : !v) is basically rails' .blank? in plain ruby | |
| class Hash | |
| def delete_blank | |
| delete_if do |k, v| | |
| (v.respond_to?(:empty?) ? v.empty? : !v) or v.instance_of?(Hash) && v.delete_blank.empty? | |
| end | |
| end | |
| end |
| -- model | |
| some sort of constant hash: | |
| HASH_NAME = { | |
| 0 => "Choose:", | |
| 1 => "On-Campus Recruiting - CSO",路 | |
| 2 => "CSO Staff Referral", | |
| 3 => "Faculty Contact",路 | |
| 4 => "Career Day",路 | |
| 5 => "CSO Summer Job Listing",路 | |
| 6 => "Alumni Contact",路 |
| require 'active_record' | |
| ActiveRecord::Base.logger = Logger.new(STDERR) | |
| ActiveRecord::Base.colorize_logging = false | |
| ActiveRecord::Base.establish_connection( | |
| :adapter => "sqlite3", | |
| :dbfile => ":memory:" | |
| ) |
| #!/usr/bin/perl | |
| #fetch Gravatars | |
| use strict; | |
| use warnings; | |
| use LWP::Simple; | |
| use Digest::MD5 qw(md5_hex); | |
| my $size = 90; |