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 | |
# by http://github.com/jehiah | |
# this prints out some branch status (similar to the '... ahead' info you get from git status) | |
# example: | |
# $ git branch-status | |
# dns_check (ahead 1) | (behind 112) origin/master | |
# master (ahead 2) | (behind 0) origin/master | |
git for-each-ref --format="%(refname:short) %(upstream:short)" refs/heads | \ |
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
/* gcc -static -o ~/mailsender mailsender.c | |
sudo dnf install glibc-static.i686 | |
# 32 bit build | |
gcc -m32 -static -o mailsender mailsender.c | |
*/ | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <sys/socket.h> | |
#include <arpa/inet.h> |
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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
"time" | |
) | |
func main() { |
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 | |
#jsonProperty=clone_url | |
# or | |
jsonProperty=ssh_url | |
[[ -z $1 ]] && { | |
echo "Usage: $0 <GitHub User ID>" | |
exit 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
# convert yaml to json | |
# pip3 install pyyaml | |
# http://pyyaml.org/wiki/PyYAMLDocumentation | |
# py3 yaml2json.py < ~/code/manpow/homeland/heartland/puphpet/config.yaml | |
# gist https://gist.github.com/noahcoad/51934724e0896184a2340217b383af73 | |
import yaml, json, sys | |
sys.stdout.write(json.dumps(yaml.load(sys.stdin), sort_keys=True, indent=2)) |
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
shell /usr/bin/zsh | |
defscrollback 10000 | |
term xterm-256color | |
startup_message off | |
hardstatus on | |
hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<" | |
vbell on | |
windows | |
bind j focus down | |
bind k focus up |
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
# https://github.com/seebi/tmux-colors-solarized/blob/master/tmuxcolors-256.conf | |
#set-option -g status-style bg=colour235,fg=colour136,default # bg=base02, fg=yellow | |
# zsh as default shell | |
set-option -g default-shell /bin/zsh | |
# set window split | |
bind-key v split-window -h | |
bind-key b split-window |