Skip to content

Instantly share code, notes, and snippets.

Avatar

Raymond Pulver IV raypulver

View GitHub Profile
View gist:4b50e117b00639de4794303d31a289ba
Flat profile:
Each sample counts as 0.01 seconds.
no time accumulated
% cumulative self self total
time seconds seconds calls Ts/call Ts/call name
0.00 0.00 0.00 13686 0.00 0.00 swizzle
0.00 0.00 0.00 251 0.00 0.00 segment_ctor
0.00 0.00 0.00 250 0.00 0.00 vm_alloc_segment
View Max.java
class Max {
public static int max(ArrayList<Integer> list) {
int currentMax = Integer.MIN_VALUE;
for (int i : list) {
if (i > currentMax) currentMax = i;
}
return currentMax;
}
}
@raypulver
raypulver / trade-fields.md
Created Sep 11, 2018
the function arguments to the IDEX trade function
View trade-fields.md

Question

What do all of these fields on a trade represent?

MethodID: 0xef343588 [0]: 0000000000000000000000000000000000000000000006a2147ceaa14651c4ed [1]: 00000000000000000000000000000000000000000000000007d322ff9719600a [2]: 000000000000000000000000000000000000000000000000000000000002e630 [3]: 000000000000000000000000000000000000000000000000000000000000002d [4]: 0000000000000000000000000000000000000000000006a2147ceaa14651c4ed

View awful.rs
extern crate openssl_sys;
extern crate openssl;
use std::mem::{ transmute };
use openssl::hash::{ MessageDigest };
use openssl_sys::{ EVP_MD };
fn hash_something() {
let mut vec: Vec<u8> = (0..255).collect();
let slice: &mut [u8] = vec.as_mut_slice();
@raypulver
raypulver / order-record.json
Created Apr 10, 2018
raw order over websocket
View order-record.json
{
"complete": false,
"id": 9320665,
"tokenBuy": "0xcdcfc0f66c522fd086a1b725ea3c0eeb9f9e8814",
"amountBuy": "898328000000000000000",
"tokenSell": "0x0000000000000000000000000000000000000000",
"amountSell": "162249773946676736",
"expires": 10000,
"nonce": 1885125689,
"user": "0x04493e280c152af24e9faad28da1c0b3134a430d",
@raypulver
raypulver / open-orders.json
Created Apr 9, 2018
returnOpenOrders output
View open-orders.json
[
{
"timestamp": 1523265879,
"orderHash": "0xf1ae732c76bd980609a79f44bf52119f946c19c1c50794b7225815b10625bbbb",
"market": "ETH_TAY",
"type": "sell",
"orderNumber": 9071666,
"params": {
"tokenBuy": "0x0000000000000000000000000000000000000000",
"buySymbol": "ETH",
View peculium-interface.json
[{"constant":true,"inputs":[],"name":"MAX_SUPPLY_NBTOKEN","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint256"}],"paya
@raypulver
raypulver / bounty-sender.js
Created Feb 14, 2018
IDXM distribution script
View bounty-sender.js
'use strict';
const {
readFile,
appendFile,
readdir,
mkdirp
} = require('fs-extra');
const {
flow,
@raypulver
raypulver / get-balance-sheet-with-compose.js
Created Feb 6, 2018
same script using promise-compose
View get-balance-sheet-with-compose.js
'use strict';
const db = require('../lib/db');
let {
argv: {
_: [ symbol ],
o: outputFilename
}
} = require('yargs');
const {
You can’t perform that action at this time.