Skip to content

Instantly share code, notes, and snippets.

View chrissexton's full-sized avatar

Chris Sexton chrissexton

View GitHub Profile
@mccoyst
mccoyst / hello.go
Created April 17, 2018 18:12
Say hi to skiesel
ackage main
import "fmt"
func main() {
fmt.Println("Hello, skiesel!")
}
anonymous
anonymous / GAME_MASTER_v0_1.protobuf
Created July 16, 2016 16:31
Pokemon Go decoded GAME_MASTER protobuf file v0.1
Result: 1
Items {
TemplateId: "BADGE_BATTLE_ATTACK_WON"
Badge {
BadgeType: BADGE_BATTLE_ATTACK_WON
BadgeRanks: 4
Targets: "\nd\350\007"
}
}
Items {
@nf
nf / vm-setup.sh
Last active June 14, 2023 22:08
Script for setting up Debian Jessie VM with my development environment
#!/bin/bash -e
echo '
PATH=$HOME/go/bin:$PATH
export GOPATH=$HOME
export CDPATH=.:$HOME/src/golang.org/x:$HOME/go/src:$HOME/src/github.com:$HOME/src/github.com/nf:$HOME/src/github.com/adg
export EDITOR=vim
' >> ~/.profile
sudo apt-get update
@daveriess
daveriess / command_alert.bash
Created November 6, 2013 04:26
OSX Command Alerts - send OSX notifications when long running commands complete requires terminal-notifier: https://github.com/alloy/terminal-notifier
#!/bin/bash
#
# OSX Command Alerts - notify when long running commands complete
#
# Uses preexec/precmd hooks by Glyph Lefkowitz
# - original: http://glyf.livejournal.com/63106.html
# - also here: https://twistedmatrix.com/users/glyph/preexec.bash.txt
#
# Define what constitutes long running (seconds)
export NOTIFY_DURATION=10
@donatj
donatj / index.php
Last active December 22, 2015 18:19
Turn the Penny Arcade DLC page into a *real* podcast.
<?php
date_default_timezone_set('America/Chicago');
$subject = file_get_contents("http://penny-arcade.com/dlc");
preg_match_all('%<li[ >].*?<h4>(?P<title>.*?)</h4>.*?class="paDLCLink"[^>]href="(?P<file>.*?)".*?</li%si', $subject, $result, PREG_SET_ORDER);
header('Content-Type: application/rss+xml');
echo '<?xml version="1.0" encoding="UTF-8"?>';
@KylePDavis
KylePDavis / sh_env_var_opts.sh
Last active September 14, 2023 01:26
Simple bash shell script templates. There are two versions: 1) simple env var based options, and 2) with added command line argument parsing and error handling.
#!/bin/bash -e
# A SHORT DESCRIPTION OF YOUR SCRIPT GOES HERE
# USAGE:
# DESCRIPTION OF ENV VARS HERE
###############################################################################
set -e # exit on command errors (so you MUST handle exit codes properly!)
set -o pipefail # capture fail exit codes in piped commands
#set -x # execution tracing debug messages
# Get command info