This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python3 | |
import subprocess | |
import sys | |
from os.path import join, basename | |
import os | |
from pathlib import Path | |
app_bundle = sys.argv[1] | |
dry_run = '--dry' in sys.argv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -l | |
exec -l fish "$@" | |
# NOTE THAT YOU ALSO NEED TO ADD THIS TO /etc/shells with the following command: | |
# echo ~/bin/fishlogin | sudo tee -a /etc/shells | |
# THEN SET IT AS THE DEFAULT SHELL | |
# chsh fishlogin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
gvim -u ~/.vim/customrc "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
git status --porcelain | \ | |
awk 'BEGIN {FS=" "} | |
{ | |
xstat = substr($0, 1, 1); | |
ystat = substr($0, 2, 1); | |
f = substr($0, 4); | |
ri = index(f, " -> "); | |
if (ri > 0) f = substr(f, 1, ri); | |
if (xstat == " " && ystat ~ "M|D") stat = "not updated"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Return the given token as either a string, or the proper number type | |
def properType(token): | |
# This will throw an exception if it fails | |
try: | |
return int(token) | |
# Try again to return a float | |
except ValueError: | |
return float(token) | |
# Otherwise it's just a string. | |
finally: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Syntax: interval-screenshots [interval (seconds)] | |
# Takes screenshots periodically and saves them to the current directory | |
while [ 1 ]; | |
do | |
vardate=$(date +%d\-%m\-%Y\_%H.%M.%S) | |
screencapture -t jpg -x ./$vardate.jpg | |
sleep $1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
cd /Applications/PICO-8.app/Contents/MacOS | |
./pico8 "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create a virtual sink for both audio streams | |
SINK_ID=$(pactl load-module module-null-sink sink_name=StreamAudio sink_properties=device.description=StreamAudio) | |
# find microphone source ID | |
MIC_ID=$(pactl list short sources | grep "Snowball" | cut -f1) | |
# loop microphone to the new sink | |
MIC_LOOPBACK_ID=$(pactl load-module module-loopback sink=StreamAudio source=$MIC_ID) | |
# find stereo monitor ID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python3 | |
import re | |
import random | |
import unittest | |
exit_commands = ( "quit", "exit", "stop" ) | |
modifier_pattern = """ | |
\s* # white space allowed between dice expression and modifier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set editing-mode vi | |
set keymap vi-command |
NewerOlder