This file contains 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 perl | |
print "Loading twitter-contest library for ttytter\n"; | |
##################################################### | |
##################################################### | |
############## CONFIG SECTION ####################### | |
##################################################### | |
##################################################### | |
#space-separated list of terms which must be in the tweet | |
#Examples: |
This file contains 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 | |
// Define the 'class' class | |
$class = Obj() | |
->fn('new', function ($class) { | |
$newClass = Obj($class->methods) | |
->fn('new', function($class) { | |
$obj = Obj($class->imethods); | |
$args = func_get_args(); | |
array_shift($args); |
This file contains 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
[colin@marle ruby-cucumber]$ cat rakespec.txt | |
(in /Users/colin/Source/ruby/ruby-cucumber) | |
** Invoke spec (first_time) | |
** Execute spec | |
"-S bundle exec rspec \"./spec/cucumber/ast/background_spec.rb\" \"./spec/cucumber/ast/feature_spec.rb\" \"./spec/cucumber/ast/outline_table_spec.rb\" \"./spec/cucumber/ast/py_string_spec.rb\" \"./spec/cucumber/ast/scenario_outline_spec.rb\" \"./spec/cucumber/ast/scenario_spec.rb\" \"./spec/cucumber/ast/step_spec.rb\" \"./spec/cucumber/ast/table_spec.rb\" \"./spec/cucumber/ast/tree_walker_spec.rb\" \"./spec/cucumber/broadcaster_spec.rb\" \"./spec/cucumber/cli/configuration_spec.rb\" \"./spec/cucumber/cli/drb_client_spec.rb\" \"./spec/cucumber/cli/main_spec.rb\" \"./spec/cucumber/cli/options_spec.rb\" \"./spec/cucumber/cli/profile_loader_spec.rb\" \"./spec/cucumber/core_ext/proc_spec.rb\" \"./spec/cucumber/formatter/ansicolor_spec.rb\" \"./spec/cucumber/formatter/color_io_spec.rb\" \"./spec/cucumber/formatter/duration_spec.rb\" \"./spec/cucumber/formatter/html_spec.rb\" \"./spe |
This file contains 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
[colin@marle gherkin]$ rake compile --trace | |
(in /Users/colin/Source/ruby/gherkin) | |
** Invoke compile (first_time) | |
** Invoke lib/gherkin/rb_lexer/zh_tw.rb (first_time, not_needed) | |
** Invoke /Users/colin/Source/ruby/gherkin/tasks/../ragel/i18n/zh_tw.rb.rl (first_time, not_needed) | |
** Invoke /Users/colin/Source/ruby/gherkin/tasks/../ragel/lexer.rb.rl.erb (first_time, not_needed) | |
** Invoke /Users/colin/Source/ruby/gherkin/tasks/../ragel/i18n/lexer_common.zh_tw.rl (first_time, not_needed) | |
** Invoke /Users/colin/Source/ruby/gherkin/tasks/../ragel/lexer_common.rl.erb (first_time, not_needed) | |
** Invoke ext/gherkin_lexer_zh_tw/gherkin_lexer_zh_tw.c (first_time, not_needed) | |
** Invoke /Users/colin/Source/ruby/gherkin/tasks/../ragel/i18n/zh_tw.c.rl (first_time, not_needed) |
This file contains 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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
if [[ -z "$PS1" ]]; then | |
# don't put duplicate lines in the history. See bash(1) for more options | |
# ... or force ignoredups and ignorespace | |
HISTCONTROL=ignoredups:ignorespace |
This file contains 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 'digest/md5' | |
class Hash | |
def to_query | |
require 'uri' | |
self.collect{ |k,v| k.to_s.downcase + '=' + URI::escape(v)}.join('&') | |
end | |
end | |
caPin = "1234" | |
caSubDomain = "track" | |
query = { |
This file contains 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
# this is failing to work as I thought because #test() is creating a function on the fly. | |
# is there a way to do this? | |
[:index, :new].each do |method| | |
test "should redirect when not logged in (#{method})" do | |
get method | |
assert_redirect_to login_url | |
end | |
end |
This file contains 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
#just make sure that you have the appropriate openssl gem required. | |
#inspiration: http://blog.agoragames.com/blog/2010/05/13/rubyreversibleencryption/ | |
class Cryptor | |
self.encryption_type = "aes-256-cbc" | |
def self.encrypt(plaintext, key) | |
cipher = OpenSSL::Cipher::Cipher.new(self.encryption_type) | |
cipher.encrypt | |
cipher.key = key | |
cipher.iv = iv = cipher.random_iv |
This file contains 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
// This file is free software; you can redistribute it and/or modify | |
// it under the terms of the GNU General Public License as published by | |
// the Free Software Foundation; version 2 of the License. | |
// This program is distributed in the hope that it will be useful, | |
// but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
// GNU General Public License for more details. | |
// You should have received a copy of the GNU General Public License |
This file contains 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
=begin | |
This class exists primarily to act as a bridge between a tournament and its | |
remote API interface, if one exists. | |
=end | |
class RemoteTournament < ActiveRecord::Base | |
belongs_to :tournament, :polymorphic => true | |
validates :remote_type, :presence => :true |
OlderNewer