Skip to content

Instantly share code, notes, and snippets.


Nate Murray jashmenn

View GitHub Profile
kahole / index.html
Last active Jan 19, 2021
View index.html
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
body {
font-family: Hack, Menlo, Monaco, 'Droid Sans Mono', 'Courier New', monospace;
white-space: pre;
levelsio / btc-eth-dca-buy.php
Last active Mar 8, 2021
This script runs daily and "Dollar Cost Average"-buys $40 BTC and $10 ETH per day
View btc-eth-dca-buy.php
// by @levelsio
// 2017-08-23
// 1) buy $40/day BTC
// 2) buy $10/day ETH
peterdemartini /
Last active Apr 15, 2021
Exclude node_modules in timemachine
find `pwd` -type d -maxdepth 3 -name 'node_modules' | xargs -n 1 tmutil addexclusion
hughrawlinson /
Last active Feb 21, 2021
Authenticate and get an oauth token for your Spotify app from the command line
# A script to quickly and easily generate Spotify oauth tokens given a client
# id, secret, and scope. Will authenticate a user via the browser.
# The app must have "http://localhost:8082/' as a redirect_uri
# spotify_client_creds.json should contain a spotify client id and secret pair
btroncone /
Last active Jun 16, 2021
RxJS 5 Operators By Example
bradp /
Last active Jun 15, 2021
New Mac Setup Script
echo "Creating an SSH key for you..."
ssh-keygen -t rsa
echo "Please add this public key to Github \n"
echo " \n"
read -p "Press [Enter] key after this..."
echo "Installing xcode-stuff"
xcode-select --install
syhw /
Last active May 7, 2021
A simple deep neural network with or w/o dropout in one file.
A deep neural network with or w/o dropout in one file.
License: Do What The Fuck You Want to Public License
import numpy, theano, sys, math
from theano import tensor as T
from theano import shared
from theano.tensor.shared_randomstreams import RandomStreams
joseraya / snapshot-crawler.js
Created Jan 21, 2014
A node script that crawls a web site and stores snapshots (taken with zombie.js) to the file system. Based on code from this article:
View snapshot-crawler.js
var Browser = require('zombie'),
url = require('url'),
fs = require('fs'),
$q = require('Q'),
saveDir = __dirname + '/_snapshots';
var scriptTagRegex = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi;
var stripScriptTags = function(html) {
XVilka /
Last active Jun 15, 2021
True Colour (16 million colours) support in various terminal applications and terminals

Terminal Colors

There exists common confusion about terminal colors. This is what we have right now:

  • Plain ASCII
  • ANSI escape codes: 16 color codes with bold/italic and background
  • 256 color palette: 216 colors + 16 ANSI + 24 gray (colors are 24-bit)
  • 24-bit true color: "888" colors (aka 16 milion)