Skip to content

Instantly share code, notes, and snippets.

🐉
!

kumavis kumavis

🐉
!
Block or report user

Report or block kumavis

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kumavis
kumavis / index.md
Created Dec 7, 2015
ethereum rpc methods, in MetaMask ProviderEngine categories
View index.md

hardcoded

  • web3_clientVersion
  • net_version
  • net_listening
  • net_peerCount
  • eth_protocolVersion
  • eth_hashrate
  • eth_mining
  • eth_syncing
@kumavis
kumavis / gist:ab8b7ce7d20e2be17417
Last active Dec 7, 2015
ethereum rpc methods and their use in web3.js
View gist:ab8b7ce7d20e2be17417

web3 properties

  • web3_clientVersion
  • net_version
  • eth_protocolVersion
  • shh_version

watches

  • eth_newBlockFilter
  • eth_newPendingTransactionFilter
  • eth_newFilter
@kumavis
kumavis / index.js
Created Oct 1, 2015
requirebin sketch
View index.js
var createGame = require('voxel-engine');
var texturePath = require('programmerart-textures')('');
var game = createGame({
texturePath: texturePath,
materials: [
['blocks/grass_top', 'blocks/dirt', 'blocks/grass_side'],
'blocks/stone',
'blocks/dirt']
});
var createPlayer = require('voxel-player')(game);
@kumavis
kumavis / index.js
Created Oct 1, 2015
requirebin sketch
View index.js
var createGame = require('voxel-engine');
var texturePath = require('programmerart-textures')('');
var game = createGame({
texturePath: texturePath,
materials: [
['blocks/grass_top', 'blocks/dirt', 'blocks/grass_side'],
'blocks/stone',
'blocks/dirt']
});
var createPlayer = require('voxel-player')(game);
View gist:95d6c5ca97bce4e408cc

OSX Config

defaults write -g InitialKeyRepeat -int 10 # normal minimum is 15 (225 ms)
defaults write -g KeyRepeat -int 1 # normal minimum is 2 (30 ms)

Applications / Utilities

  • Oh My Zsh
  • Homebrew
  • Caskroom
View gist:5f928bdacfb87e02b2cf
app = App()
hg.app(document.body, app, render)
peerLookup = {}
function onNewPeer(peerData){
var newPeer = hg.struct({
name: peerData.name,
upTime: peerData.upTime,
})
@kumavis
kumavis / index.js
Last active Aug 29, 2015
requirebin sketch
View index.js
var from = require('from')
var trumpet = require('trumpet')()
var htmlStream = from(['<html><body><span>haay</span></body></html>'])
htmlStream.on('end', didEnd('htmlStream'))
trumpet.selectAll('body', function(node){
var readStream = node.createReadStream()
var writeStream = node.createWriteStream()
readStream.on('data', function(data){ console.log(data.toString()) })
@kumavis
kumavis / index.js
Created Apr 24, 2015
requirebin sketch
View index.js
var escope = require('escope');
var esprima = require('esprima');
var estraverse = require('estraverse');
var treeify = require('treeify').asTree;
// var code = "var a = 1, b = 2; var c = 3; (function(){ var x=8, y=9; w = NaN; z })()"
// var code = "(x.y)()"
// var code = "(0,x.y)()"
//var code = "x.y.z.w()"
var code = "x.call()"
@kumavis
kumavis / gist:dbcdaf8a0c6813ef1bd8
Created Apr 7, 2015
binary buffer encoding perf test
View gist:dbcdaf8a0c6813ef1bd8
console.log( 'encode hex: '+testN(encodeTest, getRandomBuffer, 'hex', 100000).toFixed(10) )
console.log( 'decode hex: '+testN(decodeTest, getRandomData, 'hex', 100000).toFixed(10) )
console.log( '--------------' )
console.log( 'encode utf8: '+testN(encodeTest, getRandomBuffer, 'utf8', 100000).toFixed(10) )
console.log( 'decode utf8: '+testN(decodeTest, getRandomData, 'utf8', 100000).toFixed(10) )
console.log( '--------------' )
console.log( 'encode base64: '+testN(encodeTest, getRandomBuffer, 'base64', 100000).toFixed(10) )
console.log( 'decode base64: '+testN(decodeTest, getRandomData, 'base64', 100000).toFixed(10) )
console.log( '--------------' )
console.log( 'encode json: '+testN(encodeJsonTest, getRandomBuffer, 'json', 100000).toFixed(10) )
View gist:78572580ce917e753693
[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[])[!+[]+!+[]+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+
You can’t perform that action at this time.