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
$ cat command.json | |
{ | |
"method": "subevents", | |
"jsonrpc": "2.0", | |
"params": [], | |
"id": "dontcare" | |
} | |
$ wscat -k ws://localhost:9999/queryws < command.json | |
{ |
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
pragma solidity ^0.4.0; | |
contract AccountReceipt { | |
event AccountCreated( | |
address indexed _from, | |
bytes32 indexed _id, | |
uint _value | |
); | |
function AccountReceipt(bytes32 _id) public payable { |
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
pragma solidity ^0.4.18; | |
import "zeppelin-solidity/contracts/crowdsale/Crowdsale.sol"; | |
import "zeppelin-solidity/contracts/ownership/Ownable.sol"; | |
contract LoomSale is Crowdsale, Ownable { | |
using SafeMath for uint256; | |
function LoomSale(uint256 _rate, address _wallet, ERC20 _loomTokenAddr) public |
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
pragma solidity ^0.4.13; | |
library Math { | |
function max64(uint64 a, uint64 b) internal pure returns (uint64) { | |
return a >= b ? a : b; | |
} | |
function min64(uint64 a, uint64 b) internal pure returns (uint64) { | |
return a < b ? a : b; | |
} |
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
pragma solidity ^0.4.13; | |
library SafeMath { | |
/** | |
* @dev Multiplies two numbers, throws on overflow. | |
*/ | |
function mul(uint256 a, uint256 b) internal pure returns (uint256) { | |
if (a == 0) { | |
return 0; |
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
pragma solidity ^0.4.2; | |
contract Migrations { | |
address public owner; | |
uint public last_completed_migration; | |
modifier restricted() { | |
if (msg.sender == owner) _; | |
} |
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
#this program takes Web Subtitle files from sites like Viki.com and then gets the | |
#occurrence frequency and outputs a csv, to later be made into an Anki deck | |
require "webvtt" | |
require "ffi-icu" | |
$words = [] | |
def add_word(x) | |
if x != "." && x != "," && x != " " && x != "-" && x != "!" |
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
- source_labels: | |
- instance | |
modulus: 3 | |
target_label: __hash | |
action: hashmod | |
- source_labels: | |
- __hash | |
target_label: exporter | |
regex: "^2$" | |
action: keep |
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 ruby | |
require 'socket' | |
require 'optparse' | |
# Collect INFO from Redis, report it to Graphite | |
opts = OptionParser.new do |opts| | |
opts.banner = "Usage: redis-graphite.rb redis-host[:redis-port] graphite-host" | |
opts.on( '-h', '--help', 'Display this screen' ) do | |
puts opts |
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
==> Downloading ftp://ftp.gnu.org/gnu/octave/octave-3.4.0.tar.bz2 | |
File already downloaded in /Users/kanwisher/Library/Caches/Homebrew | |
==> Using Homebrew-provided fortran compiler. | |
This may be changed by setting the FC environment variable. | |
==> ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/octave/3.4.0 --with-blas=-ldotwrp -framework Accelerate | |
checking for a BSD-compatible install... /usr/bin/install -c | |
checking whether build environment is sane... yes | |
checking for a thread-safe mkdir -p... build-aux/install-sh -c -d | |
checking for gawk... no |