Skip to content

Instantly share code, notes, and snippets.

# Reload tmux config
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
set -sg escape-time 0
set -g default-terminal "screen-256color"
# window status
setw -g window-status-format "#[fg=colour7]#[bg=black] --#[fg=color7]#[bg=black] #I #W "
setw -g window-status-current-format "#[bg=colour7]#[fg=black] --#[bg=color7]#[fg=black] #I #W "
@ntietz
ntietz / color_anchors.py
Last active January 13, 2017 19:28
Quick script to figure out how many hex colors can also be anchors
# We will just go with this: https://en.wikipedia.org/wiki/Hexspeak
# So we can also support: o, i, l, s, t, g.
# We can support R but it takes 2 characters.
char_weight = {
'A': 1,
'B': 1,
'C': 1,
'D': 1,
'E': 1,
@ntietz
ntietz / keybase.md
Created July 14, 2016 03:02
keybase.md

Keybase proof

I hereby claim:

  • I am ntietz on github.
  • I am ntietz (https://keybase.io/ntietz) on keybase.
  • I have a public key whose fingerprint is 8CC4 71BE 1CDC B6EE 201B 07BA 78F5 D3D4 DF1F 195A

To claim this, I am signing this object:

@ntietz
ntietz / announce
Created June 22, 2013 05:21
A simple announce script which will give a verbal notification when your program finishes running. Usage: announce bin arg1 args2 ... (exactly the same as "time"). Alternate: announce -m "say this instead" bin arg1 arg2 ...
PROG=$1
shift
ARGS=$@
$PROG $ARGS
say -v Zarvox $MSG
@ntietz
ntietz / mystery.sh
Created February 12, 2013 15:11
This is a mystery script. WHAT DOES IT DO!?
#!/bin/rm
echo "This is just a simple script!"
VARIABLE=85
exit $VARIABLE
@ntietz
ntietz / pomodoro.sh
Created February 1, 2012 04:13 — forked from cestella/pomodoro.sh
Simple pomodoro timer in a shell
echo "PLAY DURATION: $PLAY_DURATION seconds"
while true; do
echo "WORKING FOR $1 minutes"
sleep $WORK_DURATION && \
echo "^G" && \
echo "(SayText \"PLAY FOR $2 MINUTES\")" | festival && \
echo "^G" && \
sleep $PLAY_DURATION && \
echo "^G" && \
echo "(SayText \"WORK FOR $1 MINUTES\")" | festival && \
@ntietz
ntietz / gist:1096128
Created July 20, 2011 22:52
Example of a Functor
class PrintNTimes {
public:
PrintN(int x) {
times = x;
}
void operator()(string foo) {
for (int index = 0; index < times; index++) {
cout << foo;