spec
|--- apis #do not put into controllers folder.
|--- your_api_test_spec.rb
|--- controllers
|--- models
|--- factories
|--- views
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 | |
# usage: | |
# $ das_download.rb email password [download_directory] | |
require 'mechanize' | |
# gem 'mechanize-progressbar' | |
email = ARGV[0] or raise('Please provide the email address for your account') | |
password = ARGV[1] or raise('Please provide the password for your account') | |
path = (ARGV[2] || './').gsub /\//,'' |
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 ( | |
// BuoyCondition contains information for an individual station. | |
BuoyCondition struct { | |
WindSpeed float64 `bson:"wind_speed_milehour"` | |
WindDirection int `bson:"wind_direction_degnorth"` | |
WindGust float64 `bson:"gust_wind_speed_milehour"` | |
} | |
// BuoyLocation contains the buoy's location. | |
BuoyLocation struct { |
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
FROM: https://people.xiph.org/~greg/escrowexample.txt | |
2-of-2 escrow example | |
Carbide81 wants to pay carbide80 50tnbtc but prevent carebide80 from cheating him. | |
First each party creates a new address, and then shares them. Then uses the | |
resulting addresses to make a p2sh address (begins with '3' for bitcoin, | |
'2' for testnet) that requires both parties to sign to release: |
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
/** | |
* A simple socket.io client for performance benchmark | |
* | |
* Created by redism on 2014. 4. 22.. | |
*/ | |
var SocketIO = require('socket.io-client'), | |
argv = require('optimist').argv; | |
var n = argv.n || 10; |
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
package main | |
import ( | |
"crypto/aes" | |
"crypto/cipher" | |
"encoding/base64" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" |
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
class WebkitToPng | |
def self.create(urls, options={}) | |
urls.each do |url| | |
puts "convert #{url} to #{options[:dir]}" | |
url.sub!('//', "//#{options[:auth]}@") if options[:auth] | |
op = "-F -D #{options[:dir]} -o #{url.split('/').last}" | |
op += " --user-agent='#{user_agent}'" if options[:mobile] | |
exec(url, op) | |
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
/*.swp | |
/*.png | |
.DS_Store |
OlderNewer