Skip to content

Instantly share code, notes, and snippets.

View makevoid's full-sized avatar

Francesco 'makevoid' Canessa makevoid

View GitHub Profile
@makevoid
makevoid / Dockerfile
Created April 20, 2015 22:03
ubuntu_openvpn_docker_container.docker
FROM ubuntu:14.04
RUN apt-get update && apt-get upgrade -y && apt-get install -y openvpn easy-rsa
RUN gunzip -c /usr/share/doc/openvpn/examples/sample-config-files/server.conf.gz > /etc/openvpn/server.conf
RUN sed -i -re"s/dh dh1024.pem/dh dh2048.pem/g" /etc/openvpn/server.confs
@makevoid
makevoid / appsGet.rb
Created April 7, 2015 23:44
Get all the apps you are developing on sorted by time
# Readme.md
#
# # apps_get
#
# ### Get all the apps you are developing on atm, sorted by time
#
# ### Set your configs (APP_PATH) and then:
#
# ruby appsGet.rb
#
@makevoid
makevoid / transproc_example.rb
Created April 5, 2015 04:19
Transproc example - Why are you still using activesupport?
T_FOO = Transproc(:hash_recursion, Transproc(:symbolize_keys)) + Transproc(:hash_recursion, Transproc(:map_hash, foo: :bar))
T_FOO.( foo: "baz", child: { "foo" => "asd" } )
# =>
# {:child=>{:bar=>"asd"}, :bar=>"baz"}
# quiz: try to refactor the example using function composition :D
@makevoid
makevoid / sinatrize_mini.rb
Last active August 29, 2015 14:17
Generate a Sinatra app in seconds - fork and customize at will
# Sinatrize mini
#
# usage:
#
# - download makevoid/sinatrize_mini.rb from gist.github.com ( wget https://gist.githubusercontent.com/makevoid/e5a7fd4c8c29e9b8051e/raw/a46c95d218be17136a53a8efd631411febd8815e/sinatrize_mini.rb )
# - run: `ruby sinatrize.rb` in your terminal
# - there's no step three! :D
#
# (actually you can `bundle` and `rackup` and you will be gtg!
@makevoid
makevoid / bitswitch_intel_edison_main.js
Last active March 16, 2025 03:32
BitSwitch Intel Edison sample using Node.js - #bitcoin #bitswitch #iot #edison #automation #relay #io - video: https://www.youtube.com/watch?v=gmdZxiMekOk
/*jslint node:true, vars:true, bitwise:true, unparam:true */
/*jshint unused:false */
/*global */
var mraa = require('mraa');
var request = require('request') // https://github.com/request/request
var _ = require('underscore') // docs: http://underscorejs.org/
var addr2watch = '1PzTDHe2GKjv2sHHKoN4Gbu2njLtekkYHh' // bitcoin address to watch
var loop_time = 1000 // ms (check every second)
@makevoid
makevoid / autotip_test_page.html
Created February 8, 2015 04:44
Autotip Chrome extension test page (change the BTC address to yours if you don't want to lose the tips)
<html>
<head>
<meta name="microtip" content="19e2eU15xKbM9pyDwjFsBJFaSeKoDxp8YT" data-currency='btc' data-recipient="makevoid">
</head>
<body>
Autotip test page!
</body>
</html
@makevoid
makevoid / eccentric_spacer.scad
Created February 7, 2015 17:26
Eccentric spacer makerslide / openbuilds - open hardware expensive piece - plastic prototype
// Eccentric Spacer - Makerslice compatible
// as per http://www.buildlog.net/sm_laser/drawings/b18001_rev_3.pdf
//
// CC-BY-SA Licenced under Creative Commons-Share Alike 3.0 Licence
//
//
// modified by @makevoid for more generic m5 spacer - metric - 4 in the same plate (make sure your retraction is enabled and works well)
//
// http://openbuildspartstore.com/eccentric-spacers/
//
// 137.5 gradi
j = 150;
z = 170;
z_scale = 35;
union() { // unisci tutto
for ( i = [0 : j] ) // ciclo
@makevoid
makevoid / gcode_translate_tool.html
Last active August 29, 2015 14:13
G-Code translate tool - Export from RhinoCAM (export using Mach 2), mill/use with RepRap CNC - Marlin / grbl firmware - download and open in Chrome/Firefox
<h1>G-Code translate tool</h1>
<p>Rhinocam -> Marlin (RepRap)</p>
<form>
<input type="submit" value="Translate">
<textarea name="input" placeholder="Paste GCODE in here">
G00 Z2.0000
X52.3045 Y18.9823
G01 Z2.0000
X53.7294 Y15.1116
@makevoid
makevoid / 3d_printing_supplies.md
Last active August 29, 2015 14:12
3d printing supplies