Skip to content

Instantly share code, notes, and snippets.

View adambowles's full-sized avatar
🐛
Dabbing on them bugs

Adam Bowles adambowles

🐛
Dabbing on them bugs
View GitHub Profile

Keybase proof

I hereby claim:

  • I am adambowles on github.
  • I am adambowles (https://keybase.io/adambowles) on keybase.
  • I have a public key ASD3YMbC-zwkxd1brTEhvGyRgSL-bqF-rNas_tPvTlsZUgo

To claim this, I am signing this object:

@adambowles
adambowles / pia.sh
Created November 27, 2016 13:29 — forked from dapperfu/pia.sh
#!/bin/tcsh
# Grab user information.
echo "PrivateInternetAccess OpenVPN Setup:"
echo " https://www.privateinternetaccess.com/pages/client-control-panel"
echo " -> PPTP/L2TP/SOCKS Username and Password"
echo -n "User: "
set user = $<
echo -n "Pass: "
set pass = $<
# Git
alias undopush="git push -f origin HEAD^:master"
alias gd="git diff"
alias gds="git diff --stat"
alias gdc="git diff --cached"
alias gdcs="git diff --cached --stat"
alias ga="git add"
alias gca="git commit -a -m"
alias gcm="git commit -m"
alias gbd="git branch -D"
@adambowles
adambowles / solarSystem.html
Last active October 16, 2015 10:24
Solar system model and graphical view in HTML canvas / JS. Live demo: http://jsfiddle.net/cwshg3qh/3/
<html>
<body>
<canvas id="canvas" width="512" height="512"></canvas>
<script>
/**
* Celestial body class
*/
var CelestialBody = function (name, x, y, radius, bodyColour, strokeColour) {
this.name = name;
this.x = x;
@adambowles
adambowles / tetris.js
Last active October 16, 2015 10:26
Tetris sequence generator. Live demo: http://jsfiddle.net/8zsrwm36/
var pieces = 'OISZLJT';
function tetrisGenerator(length) {
var piecesArray = pieces.split('');
var output = '';
while (output.length < length) {
// Shuffle the pieces (Fisher-Yates/Knuth shuffle: http://stackoverflow.com/a/2450976/3690621)
var current = piecesArray.length, temp, random;
while (current !== 0) {