Skip to content

Instantly share code, notes, and snippets.

View automaticgiant's full-sized avatar

Hunter Morgan automaticgiant

  • 18:16 (UTC -04:00)
View GitHub Profile
@automaticgiant
automaticgiant / httpserver.py
Last active October 20, 2018 19:06
python3 http.server extended
#!/usr/bin/env python3
'''
extension of [`http.server`](https://docs.python.org/3/library/http.server.html)
'''
from http.server import HTTPServer, SimpleHTTPRequestHandler
import threading
class Handler(SimpleHTTPRequestHandler):
def do_POST(self):
1
Michael Culhane's Blog: Authentic
Blockchains and Bogus Blockchains
Posted by Michael Culhane Jan 3, 2018
Introduction
Sandeep Sood posted, “Fake it ‘til they break us: the dangerous distraction of permissioned
blockchains” a few months ago. Reflecting on his insights and doing some further reading
on his subject, prompted me to write this post. I want to reinforce and elaborate on the
important distinction Sandeep drew between blockchains and “permissioned blockchains.”
The Relevance of the Past to the Present
@automaticgiant
automaticgiant / package.json
Last active August 29, 2015 14:19
npm scripts beats grunt
{
"name": "P2",
"version": "1.0.0",
"scripts": {
"init": "mkdirp out src/js/tests",
"clean": "rimraf out/*",
"test": "karma start",
"test:once": "karma start --single-run",
"prebuild": "cp src/$npm_package_name.* out/",
"build": "browserify src/$npm_package_name.js > out/$npm_package_name.js",
@automaticgiant
automaticgiant / Gruntfile.js
Last active August 29, 2015 14:18
Simple hw4 grunt setup - use livereload plugin or add connect livereload middleware
module.exports = function (grunt) {
var assignment = 'HW5';
var files = [assignment + '.html', assignment + '.css', assignment + '.js']
var addr;
var lookup = require('deasync')(require('dns').lookup);
addr = lookup(require('os').hostname());
@automaticgiant
automaticgiant / Makefile
Created November 14, 2014 02:29
make watch with inotifywait
CPPFLAGS ::= -std=c++11 -Wall -Werror
tests ::= $(shell ls tests/*.cpp)
objects ::= $(tests:.cpp=.o)
compile: clean $(objects)
%.o: %.cpp $(corecpp)
@g++ $(CPPFLAGS) $< -o $@
@chmod +x $@
@automaticgiant
automaticgiant / gist:6ecf1b22af0705930d82
Created October 17, 2014 15:57
2-3+ tree dot output
private String dotNode(BaseNode node){
String dotNode = "\n \"" + ((Object)node).toString() + "\" [label=<<table><tr><td port=\"l\">";
if (node instanceof InternalNode) {
dotNode += (((InternalNode)node).left == null) ? "null" : ((InternalNode)node).left;
dotNode += "\n </td><td port=\"n\">";
dotNode += ((Object)node).toString();
dotNode += "\n </td><td port=\"r\">";
dotNode += (((InternalNode)node).right == null) ? "null" : ((InternalNode)node).right;
dotNode += "\n </td></tr><tr><td port=\"cl\">";
dotNode += (((InternalNode)node).childleft == null) ? "null" : ((Object)((InternalNode)node).childleft).toString();
@automaticgiant
automaticgiant / keybase.md
Created October 2, 2014 02:18
keybase.md

Keybase proof

I hereby claim:

  • I am automaticgiant on github.
  • I am automaticgiant (https://keybase.io/automaticgiant) on keybase.
  • I have a public key whose fingerprint is 1FAA 09DA 1A9E B6A0 0BCD 606A 9D24 A5F7 4CD9 7024

To claim this, I am signing this object:

@automaticgiant
automaticgiant / 0_reuse_code.js
Created May 30, 2014 23:22
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console