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
| # The multipart parser wants to push data to the output stream, and the fog | |
| # uploader wants to pull data from the input stream, so we run the fog upload | |
| # on a separate fiber and use this class to act as the intermediary stream | |
| # between the two processes. | |
| # | |
| # This stream is not a complete implementation, it only handles the behavior we | |
| # need right now. | |
| require 'fiber' |
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
| diff --git a/src/main/html/index.html b/src/main/html/index.html | |
| index 481b4cc..043c4b4 100644 | |
| --- a/src/main/html/index.html | |
| +++ b/src/main/html/index.html | |
| @@ -42,7 +42,7 @@ | |
| console.log("key: " + key); | |
| if(key && key.trim() != "") { | |
| console.log("added key " + key); | |
| - window.authorizations.add("key", new ApiKeyAuthorization("api_key", key, "query")); | |
| + window.authorizations.add("key", new ApiKeyAuthorization("Authorization", "Bearer " + key, "header"));^M |
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/node | |
| var b = require('bonescript'); | |
| var fs = require('fs'); | |
| var util = require('util'); | |
| function TemperatureProbe(deviceName) { | |
| this.deviceName = deviceName; | |
| this.path = '/sys/bus/w1/devices/' + deviceName + '/w1_slave'; |
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
| 1c1 | |
| < require 'rack/utils' | |
| --- | |
| > require 'streaming_upload' | |
| 3,4c3,18 | |
| < module Rack | |
| < module Multipart | |
| --- | |
| > class StreamingMultipartRequest < ActionDispatch::Request | |
| > def parse_multipart(env) |
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
| imagemagick | |
| libcurl4-gnutls-dev | |
| libmysqlclient-dev | |
| libpq-dev | |
| libsqlite3-dev | |
| libxml2-dev | |
| libxmlsec1 | |
| libxmlsec1-dev | |
| libxslt1-dev | |
| nodejs |
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 rdmd | |
| import | |
| std.algorithm, | |
| std.file, | |
| std.csv, | |
| std.stdio, | |
| std.typetuple, | |
| std.typecons, | |
| std.range, |
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
| { | |
| "freighthop::languages": ["ruby"], | |
| "freighthop::ruby_version": "2.0.0-p247", | |
| "freighthop::database::flavors": ["postgres", "mysql"], | |
| "freighthop::database::postgres::users": ["notorious"], | |
| "freighthop::database::postgres::db_names": ["notorious_development","notorious_test"], | |
| "freighthop::database::mysql::users": ["notorious@localhost"], | |
| "freighthop::database::mysql::db_names": ["notorious_development","notorious_test"], | |
| "freighthop::packages": [ | |
| "ffmpeg", |
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
| import std.stdio; | |
| import std.string; | |
| import std.conv; | |
| import std.array; | |
| import std.range; | |
| void times(int count, void delegate() cb) { | |
| for (int i = 0; i < count; ++i) { | |
| cb(); | |
| } |
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 Field < Struct.new(:rows, :cols, :data) | |
| def initialize(rows, cols) | |
| super(rows, cols) | |
| self.data = ([0] * (cols+2)) * (rows+2) | |
| end | |
| def [](x,y) | |
| self.data[real_idx(x,y)] | |
| end |
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 'digest/md5' | |
| digest = Digest::MD5.hexdigest(ARGV[0]) | |
| token = digest.to_i(16) | |
| token = token - (1 << bits) if (token & (1 << (bits - 1))) != 0 | |
| puts token.abs |