Skip to content

Instantly share code, notes, and snippets.

View pprince's full-sized avatar

Paul Prince pprince

View GitHub Profile
Another idea I thought of that would be very portable would be to add the following to the very end of your ~/.bashrc file.
if [[ -n "START_COMMAND" ]]; then
start_command="$START_COMMAND"
unset START_COMMAND
eval "$start_command"
fi
Then when you want to launch a shell with a command first, just do:
# ~/.zshrc
# ========
# This file is sourced only for interactive shells. It
# should contain commands to set up aliases, functions,
# options, key bindings, etc.
#
# Global Order: zshenv, zprofile, zshrc, zlogin
@pprince
pprince / dotzshrc.zsh
Last active March 16, 2016 19:59
.zshrc -- Episode vi: A New Hope
# ~/.zshrc
# ========
# This file is sourced only for interactive shells. It
# should contain commands to set up aliases, functions,
# options, key bindings, etc.
#
# Global Order: zshenv, zprofile, zshrc, zlogin
mine_functions:
private_ips:
- mine_function: network.ip_addrs
- eth1
fqdn:
- mine_function: grains.get
- fqdn
user@host$ sudo salt '*' grains.get ipv4
nip.littlebluetech.com:
- 104.238.135.45
- 127.0.0.1
m2.nacl.littlebluetech.com:
- 45.63.8.169
- 127.0.0.1
m1.nacl.littlebluetech.com:
- 45.63.9.219
- 127.0.0.1
0 1 -1 2 -2 3 -3 4 -4 5 -5 6 -6
0 1 2 3 4 5 6 7 8 9 10 11 12
int -> nat
----------
if 0 -> 0
if negative: abs(n)*2
if positive: 2n-1
nat -> int
foo:
bar:
baz:
xy:
xyz:
xyzzy:
[user]
name = Paul Prince
email = [email protected]
[filter "lfs"]
clean = git-lfs clean %f
smudge = git-lfs smudge %f
required = true
[core]
autocrlf = input
[push]
/* holy crap, how have I never known you could do the following... */
// correct
#if HELLO_WORLD
# include "HellWorld.h"
#endif
// incorrect
#if HELLO_WORLD
/*
PTT_for_Voicemeeter.ahk - AHKscript Push-to-Talk for VoicemeeterBanana
======================================================================
Author: "Paul Prince" <[email protected]>
License: Modified BSD License; see ./LICENSE.txt
Inspired by:
------------
- WindowPadX