Skip to content

Instantly share code, notes, and snippets.

Natalie Pendragon natpen

Block or report user

Report or block natpen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@natpen
natpen / compose-game-artifacts.pl
Created Sep 20, 2016
Quick and dirty perl script I wrote to compose a bunch of game artifact PDFs. Some have "repeat me" modifiers in the filename, which this respects. The goal is just an easily-printable pdf to take to the neighborhood printing shop.
View compose-game-artifacts.pl
#!/usr/bin/env perl
use strict;
use warnings;
# NOTE: have to use absolute dirpath for ARGV[0] for now
use IO::Dir;
use File::Basename;
my $pdfjoin_input_args = "";
@natpen
natpen / python_recursive_fuzzy_float_comparison.py
Last active Jul 15, 2016
python recursive fuzzy float comparison
View python_recursive_fuzzy_float_comparison.py
def _is_close(a, b, rel_tol=1e-09, abs_tol=0.0):
return abs(a-b) <= max(rel_tol * max(abs(a), abs(b)), abs_tol)
def _is_fuzzy_equal(expected, actual):
if isinstance(expected, set):
expected = list(expected)
if isinstance(actual, set):
View nodeStreamConfusion2.js
var spawn = require('child_process').spawn;
var csv = require('csv');
var ls = spawn('git', ['log']);
ls.on('close', function (code) {
console.log('exit code ' + code);
});
var parser = csv.parse({ delimiter: '\t' });
View nodeStreamConfusion.js
var extend = require('extend');
var spawn = require('child_process').spawn;
var csv = require('csv');
var ls = spawn('git', ['log']);
ls.stdout.on('data', function (data) {
parser.write(data);
});
@natpen
natpen / .bash_profile
Created Oct 21, 2014
This is not the greatest .bash_profile in the world, no. This is just a tribute.
View .bash_profile
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
@natpen
natpen / .bashrc
Created Oct 21, 2014
This is not the greatest .bashrc in the world, no. This is just a tribute.
View .bashrc
# MISC
alias less='less -r'
# --show-control-chars: help showing Korean or accented characters
alias ls='ls -F --color --show-control-chars'
alias ll='ls -l'
# GIT
alias gs='git status'
alias ga='git add'
alias gau='git add -u'
You can’t perform that action at this time.