Skip to content

Instantly share code, notes, and snippets.

@andmcgregor
andmcgregor / gist:5856248
Last active December 20, 2017 15:42
Spinning wheel javascript
<html>
<canvas id="wheel" width="500" height="500">
<p>Upgrade your browser!</p>
</canvas>
<script type="text/javascript">
var images = ["http://bahaaaaal.com/wp-content/uploads/2013/01/siam-food-gallery.jpg","http://images.sciencedaily.com/2013/03/130307124701-large.jpg"] // sample images
function drawSlice(startAngle, i) {
sudo iptables -t nat -A PREROUTING -p tcp -i enp0s31f6 --dport 9983 -j DNAT --to-destination 192.168.0.119:9983
sudo iptables -t nat -A PREROUTING -p tcp -i enp0s31f6 --dport 9984 -j DNAT --to-destination 192.168.0.119:9984
sudo iptables -A FORWARD -p tcp -d 192.168.0.119 --dport 9983 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
sudo iptables -A FORWARD -p tcp -d 192.168.0.119 --dport 9984 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
sudo bash -c "iptables-save > /etc/iptables/iptables.rules"
sudo systemctl reload iptables.service
./siad --rpc-addr 9983 --host-addr 9984
Verifying that "andrewmc.id" is my Blockstack ID. https://onename.com/andrewmc
### Keybase proof
I hereby claim:
* I am andmcgregor on github.
* I am andrewmc (https://keybase.io/andrewmc) on keybase.
* I have a public key whose fingerprint is 08E9 9759 A27A 4125 115C 5223 EFCE 720D 8D24 2D75
To claim this, I am signing this object:
@andmcgregor
andmcgregor / README.md
Last active April 11, 2017 18:11
Map Widget for Dashing Framework
$turquoise-light: #1abc9c;
$turquoise-dark: #16a085;
$emrald-light: #2ecc71;
$emrald-dark: #27ae60;
$blue-light: #3498db;
$blue-dark: #2980b9;
$purple-light: #9b59b6;
$purple-dark: #8e44ad;
$asphalt-light: #34495e;
$asphalt-dark: #2c3e50;
@andmcgregor
andmcgregor / gui
Last active March 15, 2016 18:55
gui
#!/bin/bash
cd gui
tmux new-window -n GUI grunt watch
tmux split-window -t GUI -h
tmux split-window -t GUI.0
tmux resize-pane -t GUI.0 -y 4
cd ..
#!/bin/bash
tmux new-window -n $1 vim shaders/$1.vert
tmux split-window -t$1 -h vim shaders/$1.frag
@andmcgregor
andmcgregor / o
Last active January 28, 2016 17:39
Open class in new tmux window
#!/bin/bash
tmux new-window -n $1 vim include/$1.h
tmux split-window -t$1 -h vim src/$1.cpp
@andmcgregor
andmcgregor / zoo.js
Last active December 19, 2015 07:28 — forked from dbc-challenges/zoo.js
//------------------------------------------------------------------------------------------------------------------
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here.
//------------------------------------------------------------------------------------------------------------------
function Zoo() {
}
Zoo.init = function(animals) {
this.animals = animals;