Instantly share code, notes, and snippets.

View Keybase
### Keybase proof
I hereby claim:
* I am nahurst on github.
* I am nahurst ( on keybase.
* I have a public key ASAcZEaVzPl4LOjSEYoWnWnilVDgU7z3upJ64MmSUg_OCQo
To claim this, I am signing this object:

Often when running tests, you'll see output like:

at Context.<anonymous> (tests/domains/MySchoolPage/WishList/SchoolWishListRowLayout-test.jsx:50:58)

If you Cmd+Click on the file path, you can go directly to the line position of the problem by doint the following:

Open iTerm > Preferences > Profiles > (Your Profile) > Advanced > Semantic History Choose "Run command..." Enter something like

View singleTest.js
describe('something', () => {});
describe.only('something', () => {});
digraph "g" {
Paco [fillcolor="#FF6FF3", shape=box]
Paco -> List;
List -> "Lots Of People";
"Lots Of People" -> List;
List -> Archives;
View sinatra+thin+ssl.rb
#!/usr/bin/env ruby
# This code snippet shows how to enable SSL in Sinatra+Thin.
require 'sinatra'
require 'thin'
class MyThinBackend < ::Thin::Backends::TcpServer
def initialize(host, port, options)
openssl genrsa -des3 -passout pass:x -out server.pass.key 2048
openssl rsa -passin pass:x -in server.pass.key -out server.key
rm server.pass.key
openssl req -new -key server.key -out server.csr
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
View gist:e30bef22f260604220e9
sudo kextunload -b
sudo kextload -b
# because we don't have findsn with fslint, we need to do it ourselves
# find . -type f -exec basename {} \; | \ # get the name of the file. could be substituted to do hashes here
# sort | \ # prep for counting
# uniq -c | \ # count occurences
# grep -v "^[ \t]*1 " | \ # mind the formatting
# awk '{print $2}' | \ # get only the file names, not the counts
# xargs -I {} find . -name '{}*' # find the location of the duplicates
find . -type f -exec basename {} \; | \
View index.html
<html ng-app="myApp">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Basic App</title>
<link rel="stylesheet" href="">
<link rel="stylesheet" href="">
# set these in your .bash_profile, .bashrc, .zshrc first
HISTFILESIZE=100000 # how many lines to keep total
HISTSIZE=100000 # how many lines to keep for the current session
# oh-my-zsh will default to a reasonable 10000, but most bash defaults to a few hundred
# oh-my-zsh by default appends all commands to history after they are run instead of on session end
# search the history with control-r
# search for commands starting with the one you typed with alt-p
# if you don't want something to stay in your history, prefix the command with a space