Skip to content

Instantly share code, notes, and snippets.

View makevoid's full-sized avatar

Francesco 'makevoid' Canessa makevoid

View GitHub Profile
@makevoid
makevoid / insurance.sol.c
Last active September 21, 2015 08:25
peer-to-peer Insurance smart-contract - written by Thomas Bertani - @bertani on github - Used in http://github.com/bertani/InsurETH
contract OraclizeI {
function query(uint timestamp, byte[] formula_1, byte[] formula_2, byte[] formula_3, byte[] formula_4){}
function query(uint timestamp, address param, byte[] formula_1, byte[] formula_2, byte[] formula_3, byte[] formula_4){}
}
contract Insurance {
// logging helper
event Log(uint k);
@makevoid
makevoid / repo_create.sh
Last active August 29, 2015 14:27
repo_create.sh.alias - Aliases **repo_create** combo (gcom, gaa and especially gpc are my favourite git aliases"
# prepreq: gem i hub - or - brew install hub
# alias gcom="git commit -m"
# alias gaa="git add ."
# function gpc {
# cur_branch=$(git rev-parse --abbrev-ref HEAD)
# git push origin $cur_branch
# }
alias repo_create="git init . ; hub create ; touch Readme.md; gaa; gcom 'repo init'; gpc;"
@makevoid
makevoid / TODO.md
Last active October 1, 2015 01:31
TODO
  • 3d printing
  • 3d demo, 3d fitters
  • bitnfc
  • print 3d bitcoin tags
  • raudo deployment tool
  • clef password example
  • roda opal react.rb integration
  • roda
  • opal - react.rb - redis api - remote store (remote storage)
  • api to wolfram alpha
@makevoid
makevoid / bitswitch_relay_intel_edison_nodejs.js
Last active January 5, 2016 00:39
#bitswitch #bitcoin's #blockchain controlled #servo motor / vending machine releasing an object / turn light on/off - Intel Edison #iot
/*jslint node:true, vars:true, bitwise:true, unparam:true */
/*jshint unused:false */
/*global */
/*forked from: https://gist.github.com/makevoid/edcb65b679ddbd8c69fd */
var mraa = require('mraa');
var request = require('request') // https://github.com/request/request
var _ = require('underscore') // docs: http://underscorejs.org/
var addr2watch = '19e2eU15xKbM9pyDwjFsBJFaSeKoDxp8YT' // bitcoin address to watch
# main method / fn
#
def combined_sorted_enum(enums)
out = []
enum_ended = nil
while true do
enums.sort_by! do |enum|
begin
enum.peek
@makevoid
makevoid / juggernaut.rb
Last active August 29, 2015 14:27 — forked from maccman/juggernaut.rb
Sinatra Server Side Event streaming.
# Usage: redis-cli publish message hello
require 'sinatra'
require 'redis'
conns = []
get '/' do
erb :index
end
@makevoid
makevoid / atom_gist_integration.rb
Created August 13, 2015 22:04
test atom integration
test
@makevoid
makevoid / alpha-editor.rb
Last active August 29, 2015 14:27
v alpha - 2 tabs synced UI+server SPA + blockchain git state
# another idea - see index2
# when you code the code - a possible implementation gets built
# when you code the class (interface, module, view wathever)
# - a server is written to hit the view
# - an implementation like this one - so only an editor like codemirror on 2 tabs synced
class People
@makevoid
makevoid / install_bitcoin.sh
Last active April 12, 2026 04:42
Install bitcoin - bitcoind - v 0.19.0.1 - from binary - bitcoin.org - quick install
set -xe
mkdir ~/tmp
cd ~/tmp
wget https://bitcoin.org/bin/bitcoin-core-0.19.0.1/bitcoin-0.19.0.1-x86_64-linux-gnu.tar.gz --no-check-certificate
# check the shasum
tar xvf bitcoin-0.19.0.1-x86_64-linux-gnu.tar.gz
@makevoid
makevoid / transport.coffee
Created August 1, 2015 18:03
Transport plugin modified - fedwiki
expand = (text)->
text
.replace /&/g, '&'
.replace /</g, '&lt;'
.replace />/g, '&gt;'
.replace /\*(.+?)\*/g, '<i>$1</i>'
beam = (url) ->
$.getJSON url, (page) ->