Skip to content

Instantly share code, notes, and snippets.

@jmandzik
jmandzik / vpn_fix.sh
Created April 26, 2016 01:32 — forked from sudowork/vpn_fix.sh
Fixes firewall rules and corrects routes that may have been overwritten by a VPN client.
#!/usr/bin/env bash
# You must have sudo ability on your machine
machine=${1:-"default"}
if [[ ! $(docker-machine ls | grep ${machine}) ]]; then
echo "${machine} is not a docker-machine"
exit 1
fi
@jmandzik
jmandzik / easing.js
Last active August 29, 2015 14:08 — forked from gre/easing.js
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
// no easing, no acceleration
linear: function (t) { return t },
// accelerating from zero velocity
easeInQuad: function (t) { return t*t },
// decelerating to zero velocity
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
body {
font: 14px sans-serif;
}
.axis path, .axis line {
fill: none;
@jmandzik
jmandzik / gist:5216975
Last active December 15, 2015 06:29 — forked from padolsey/gist:527683
JS Snippet: Detect IE
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
@jmandzik
jmandzik / noise.sh
Created December 14, 2012 15:40 — forked from rsvp/noise.sh
#!/usr/bin/env bash
# bash 4.1.5(1) Linux Ubuntu 10.04 Date : 2011-10-04
#
# _______________| noise : ambient Brown noise generator (cf. white noise).
#
# Usage: noise [minutes=59] [band-pass freq center=1786] [wave]
# ^minutes can be any positive integer.
# Command "noise 1" will display peak-level meter.
#
# Dependencies: play (from sox package)