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
type Json = | |
| Null | |
| Bool of bool | |
| Number of float | |
| String of string | |
| Array of Json list | |
| Object of (string * Json) list | |
type Bracket = Open | Close |
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
.DS_Store | |
Gemfile.lock | |
*.pem | |
node.json | |
tmp/* | |
!tmp/.gitignore |
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 "rubygems" | |
require "haml" | |
require "sinatra" | |
require "linkedin" | |
enable :sessions | |
helpers do | |
def login? | |
if session[:atoken].nil? |
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 'rubygems' | |
require 'bcrypt' | |
require 'haml' | |
require 'sinatra' | |
enable :sessions | |
userTable = {} | |
helpers do |
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 File.expand_path(File.dirname(__FILE__) + '/../samples_config') | |
# Topic's arn can be found in AWS Management, under Topic Details. | |
(topic_arn, message) = ARGV | |
unless topic_arn && message | |
puts "Usage: upload.rb <TOPIC_ARN> <MESSAGE>" | |
exit 1 | |
end | |
# Get an instance of the SNS interface using the default configuration |
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
http = require 'http' | |
rest = require 'restler' | |
realm = escape "Staghelm" | |
guild = escape "Controlled Chaos" | |
type = { | |
1: "Warrior", 2: "Paladin", 3: "Hunter", | |
4: "Rogue", 5: "Priest", 6: "Death Knight", | |
7: "Shaman", 8: "Mage", 9: "Warlock", |
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 ruby | |
require 'rubygems' | |
require 'mechanize' | |
URL_PRELOADER = 'https://customer.comcast.com/Secure/Preload.aspx?backTo=%2fSecure%2fUsers.aspx&preload=true' | |
URL_USERS = 'https://customer.comcast.com/Secure/Users.aspx' | |
abort "Usage: #{$0} <username> <password>" unless ARGV.length == 2 |
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
# NAME: recaptcha | |
# VERSION: 1.0 | |
# AUTHOR: Peter Cooper [ http://www.rubyinside.com/ github:peterc twitter:peterc ] | |
# DESCRIPTION: Sinatra plugin to provide CAPTCHA support through recaptcha.net | |
# COMPATIBILITY: 0.3.2 /and/ latest rtomayko Hoboken builds! | |
# LICENSE: Use for what you want, just don't claim full credit unless you make significant changes | |
# | |
# INSTRUCTIONS: | |
# 0. Check out an extended client code example at the footer of this file | |
# 1. Ensure _this_ file is lib/recaptcha.rb within your app's directory structure |