Skip to content

Instantly share code, notes, and snippets.

View makevoid's full-sized avatar

Francesco 'makevoid' Canessa makevoid

View GitHub Profile
@makevoid
makevoid / soup.py
Created June 18, 2015 22:19
bitcoin soup py
from urlparse import urlparse
import json, requests
from bs4 import BeautifulSoup # sudo pip install beautifulsoup4
import codecs
def parse_page(last_note_ts, pos_max):
refresh_cursor = "&refresh_cursor=TWEET-463466102396583936-463468070993137664-BD1UO2FFu9QAAAAAAAAETAAAAAcAAAASAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
# https://twitter.com/i/search/timeline?q=#bitcoin since:2014-05-05 until:2014-05-06&src=savs&vertical=default&composed_count=0&include_available_features=1&include_entities=1&include_new_items_bar=true&interval=30000&last_note_ts=1434594375&latent_count=0&refresh_cursor=TWEET-463466102396583936-463468070993137664-BD1UO2FFu9QAAAAAAAAETAAAAAcAAAASAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
@makevoid
makevoid / produce_bench.rb
Created June 26, 2015 13:45
produces benchmarks from debug output for our microservices at work
require 'descriptive_statistics'
Dir.glob("before/*") do |path|
lines = File.readlines(path)
lines = lines.map do |line|
m = line.match(/took (\d+\.\d+). Status:/)
m && m[1].to_f
end
@makevoid
makevoid / blockchain_md5_check_distro.EN.md
Last active August 29, 2015 14:25
Idea - blockchainDB application

using cron


tree /etc/cron.d

and on ubuntu, by default there are nthousand cron and youDontKnowWhat they are executing

@makevoid
makevoid / payments_dreamcode.js
Last active August 29, 2015 14:26 — forked from gr2m/payments_dreamcode.js
Imagine you could purchase items from your store, with pure JavaScript in the browser. How would it look like? Here's what I came up with. Forks & comments much appreciated! #nobackend #dreamcode
// purchase a product with a credit card
purchase('productId')
.using( {
cc: "4556934156210213",
valid: "2016-10",
csc: "123"
} )
// purchase a product with paypal
purchase('productId')
@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) ->
@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 / 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 / atom_gist_integration.rb
Created August 13, 2015 22:04
test atom integration
test
@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
# main method / fn
#
def combined_sorted_enum(enums)
out = []
enum_ended = nil
while true do
enums.sort_by! do |enum|
begin
enum.peek