Skip to content

Instantly share code, notes, and snippets.

View nopdotcom's full-sized avatar

Jay Carlson nopdotcom

  • No Operation Partners
View GitHub Profile
@nopdotcom
nopdotcom / iter-vs-func.ipynb
Created August 30, 2021 19:40
Microbenchmarking iterative vs functional style
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nopdotcom
nopdotcom / elif.ipynb
Created June 1, 2021 16:01
Python 3.9 on MBA M1: hash of functions, vs elif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nopdotcom
nopdotcom / cloud-init.sh
Last active July 16, 2020 12:28
A cloud-init script for striesand-builder’s dependencies. Tested on EC2, DO, GCE, Vultr.
#!/bin/sh
#
# This script takes a while to run. The file "ready" is created when finished.
# If you're logged in early, you can watch progress with the command
#
# tail -f /var/log/cloud-init-output.log
#
DEBIAN_FRONTEND=noninteractive
export DEBIAN_FRONTEND
if ! id ubuntu >/dev/null 2>&1; then
@nopdotcom
nopdotcom / man-no-justification
Last active May 12, 2018 17:37
Stop the madness of fully-justified manpages on Linux
# alias man='man --nh --nj'
export MANOPT='--nh --nj'
@nopdotcom
nopdotcom / streisand-depends.sh
Last active October 27, 2017 12:46
Script to install all StreisandEffect/streisand dependencies on Ubuntu
#!/bin/bash
### STREISAND RUNTIME DEPENDENCIES BEGIN HERE
apt-get --yes install python-pip git build-essential python-dev python-setuptools python-cffi libffi-dev libssl-dev python-nacl
# We only really wanted python-pip for its dependencies.
pip install --upgrade pip
# The pip we want should be in /usr/local now. Don't fail if it didn't install right.
hash -r
pip install boto boto3 "ansible[azure]" dopy==0.3.5 "apache-libcloud>=1.5.0" linode-python pyrax
pip install ansible
#!/bin/sh
#
# If you're on an existing Ubuntu 16.04 machine, you can skip down to the DEPENDENCIES
# section. Otherwise you can use this file as a cloud-init on various providers.
#
# It would be much simpler if it only worked on one provider.
#
# This script takes a while to run. The file "ready" is created when finished.
# If you're logged in early, you can watch progress on most systems with the command
#
@nopdotcom
nopdotcom / file-fragments
Created October 11, 2017 16:18
Stop the madness of fully-justified manpages on OS X aka macOS
.bash_profile fragment:
export GROFF_TMAC_PATH="$HOME/Documents/tmac"
----
~/Documents/tmac/man.local:
.\" This file is loaded after an-old.tmac.
.\" Put any local modifications to an-old.tmac here.
.ad l
.nh
@nopdotcom
nopdotcom / gist:a4a26477c70483833a040e2fd8908c4e
Created October 11, 2017 16:17
Stop the madness of fully justified manpages on OS X aka macOS
.bash_profile fragment:
export GROFF_TMAC_PATH="$HOME/Documents/tmac"
----
~/Documents/tmac/man.local:
.\" This file is loaded after an-old.tmac.
.\" Put any local modifications to an-old.tmac here.
.ad l
.nh
@nopdotcom
nopdotcom / Documents-tmac-man.local
Created October 11, 2017 16:14
Stop the madness of fully-justified manpages on OS X (aka macOS)
.\" This file is loaded after an-old.tmac.
.\" Put any local modifications to an-old.tmac here.
.ad l
.nh