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
/** | |
* Check for arbitrage bet. | |
* | |
* @class Arbitrage | |
*/ | |
var Arbitrage = Arbitrage || {}; | |
var args = []; |
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
function string2ascii(string, sep) { | |
return string.split('') | |
.map(e => e.charCodeAt(0)).join(sep ? sep : ''); | |
} | |
function string2hex(string, sep) { | |
return string.split('') | |
.map(e => e.charCodeAt(0).toString(16)).join(sep ? sep : ''); | |
} |
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 node | |
var blockexplorer = require('blockchain.info/blockexplorer') | |
// randomly chosen | |
var addresses = [ | |
'1CEDQ9Vfq8pYVi3Anp926Zjac9Xiz394Y1', | |
'1CGXTwzjTHbUJXLAvWB4r7L2QLctEpWjti', | |
'1DUb2YYbQA1jjaNYzVXLZ7ZioEhLXtbUru', | |
'1Hz96kJKF2HLPGY15JWLB5m9qGNxvt8tHJ', |
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
# -*- coding: utf-8 -*- | |
import multiprocessing | |
import requests | |
Host = 'http://www.example.com' | |
Username = 'YOUR USERNAME' | |
Password = 'YOUR PASSWORD' | |
Urls = ('about', 'admin', 'newticket' |
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
# apps | |
alias e='exit' | |
alias v='vim' | |
alias g='git' | |
alias gr='grep' | |
alias c='cut' | |
alias h='head' | |
alias t='tail' | |
alias tf='tail -f' | |
alias le='less' |
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
# command (one-off step) | |
mkdir -m700 ~/.history | |
# in .bashrc | |
HISTFILE=~/.history/history.`tty | cut -d/ -f4` |
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
function extendObject(parent, child) { | |
var copyFunction = function (f) { | |
var t = function () { | |
return f.apply(this, arguments); | |
}; | |
Object.defineProperty(t, 'name', { | |
value: f.name, | |
}); | |
return t; | |
}, |
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
console.log(' '.repeat(10), "☆"); | |
for (let i = 1, s = ''; i < 10; i++) { | |
console.log(' '.repeat(10 - i), `${s += i}=${+s * 8 + i}`); | |
} | |
console.log(' '.repeat(9), '_=_'); | |
/** | |
Based on the eight calculations: |
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
#include <stdio.h> | |
/* | |
The conversion from `int` to `char` in this sequence is not to guaranteed to work on all systems. | |
See more in the comments of the accepted answer: http://stackoverflow.com/questions/21196926 | |
*/ | |
int main() { | |
int i; | |
int e = 0; | |
char numbers[11]; | |
char alpha_capital[27]; |
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
var string = 'string', | |
stringIndex = function () { | |
string[0]; | |
}, | |
stringSlice = function () { | |
string.slice(0, 1); | |
}, | |
stringSubstring = function () { | |
string.substring(0, 1); | |
}; |
NewerOlder