Printable version. Just delete this line and use pandoc tmux-cheatsheet.markdown -o tmux.pdf -V geometry="margin=1in"
tmux kill-session -t myname
#! /usr/bin/env bash | |
ssh barronk@age4.nber.org \ | |
-o LogLevel=QUIET \ | |
-t $'showload | sed -n \'/-----/,$p\' | sed -r \'/afserver|gruber|miller|sas|age8|age11|age12/d\' | sed -e \'/It might/,$d\'' |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# TODO: Comment code; include regexp? explanations | |
# TODO: parse with delimit in separate file; note this is imperfect. It | |
# has to be because of the way it works, which is super messy (specially | |
# for multi-line strings; i.e. stuff in quotes spanning many lines). | |
# TODO: scan code for `/*/`, `*/*`, and similar constructs. 'Please open |
It's a common confusion about terminal colours... Actually we have this:
printf "\x1b[${bg};2;${red};${green};${blue}m\n"
#! /usr/bin/env bash | |
# Script to build parquet-cpp with Arrow as a static dependency | |
# Modified from: | |
# https://stackoverflow.com/questions/48157198/how-can-i-statically-link-arrow-when-building-parquet-cpp | |
mkdir -p parquet-cpp-deps | |
DEPDIR=$PWD/parquet-cpp-deps | |
git clone https://github.com/apache/parquet-cpp |
const { CompositeDisposable, Point, Range } = require('atom'); | |
atom.commands.add('atom-text-editor', 'me:insert-number-list', () => { | |
var editor = atom.workspace.getActiveTextEditor(); | |
var selections = editor.getSelections(); | |
for (var i = 0; i < selections.length; i++) { | |
selection = selections[i] | |
selection.insertText(String(i + 1)) | |
} |
#! /usr/bin/env python3 | |
""" | |
Program: Combine Halfmile GPX tracks into a single GPX track | |
Author: Kyle Barron | |
""" | |
import io | |
import requests | |
import gpxpy | |
import gpxpy.gpx |
#! /usr/bin/env python3 | |
import requests | |
r = requests.get('https://hacker-news.firebaseio.com/v0/topstories.json') | |
top_ids = r.json()[:40] | |
url_scrape_list = ['https://news.ycombinator.com'] | |
for hn_id in top_ids: | |
hn_comment_url = f'https://news.ycombinator.com/item?id={hn_id}' | |
url_scrape_list.append(hn_comment_url) |
#!/bin/sh | |
SITEMAP=$1 | |
if [ "$SITEMAP" = "" ]; then | |
echo "Usage: $0 http://domain.com/sitemap.xml" | |
exit 1 | |
fi | |
XML=`wget -O - --quiet $SITEMAP` |