Skip to content

Instantly share code, notes, and snippets.

View chrissexton's full-sized avatar

Chris Sexton chrissexton

View GitHub Profile
@chrissexton
chrissexton / sh_env_var_opts.sh
Created September 14, 2023 01:26 — forked from KylePDavis/sh_env_var_opts.sh
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
@chrissexton
chrissexton / content.md
Last active November 25, 2021 16:19
So you have a Mac. Maybe you should know some things

So you have a Mac. Maybe you should know some things

Welcome to my old machine. It served me well and I hope it serves you well too. I wanted to write a few tips that many new Mac owners don't seem to realize. These are notes to help you not miss out. Because if you just treat it like any other computer, you are both missing the point and going to look like a fool.

Physical details

  • This machine is a late 2016 and it is well used.
  • The up arrow probably works about 80% of the time. Just enough to trust but also not enough to keep you sane.
  • I highly recommend going into Keyboard>Modifier keys and switching caps lock to being escape. It solves the only real trouble with the touchbar
  • Speaking of the touchbar, be aware that a few pixels on the right side are dead. That might spread, but it's limited to the place that the "siri button" is by default.
@chrissexton
chrissexton / .vimrc
Created November 22, 2018 12:42
Plug auto-install
set nocompatible " be iMproved
let iCanHazPlugged=1
let vim_plug_file=expand("~/.vim/autoload/plug.vim")
if !filereadable(vim_plug_file)
echo "Installing vim-plug"
echo ""
silent !mkdir -p ~/.vim/autoload
silent !curl -fLo ~/.vim/autoload/plug.vim https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
let iCanHazPlugged=0
@chrissexton
chrissexton / hello.go
Last active April 17, 2018 18:13 — forked from mccoyst/hello.go
Say hi to skiesel
ackage main
import "fmt"
func main() {
fmt.Println("Hello, mccoyst!")
}
@chrissexton
chrissexton / GAME_MASTER_v0_1.protobuf
Created July 17, 2016 13:35 — forked from anonymous/GAME_MASTER_v0_1.protobuf
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 {

Keybase proof

I hereby claim:

  • I am chrissexton on github.
  • I am chrissexton (https://keybase.io/chrissexton) on keybase.
  • I have a public key whose fingerprint is EBD6 A39C F414 C477 F176 1F94 D1BB F1EB 8B8C C077

To claim this, I am signing this object:

@chrissexton
chrissexton / gen_journal.go
Created December 16, 2014 17:33
Todoist daily task generator
package main
import (
"flag"
"fmt"
"time"
)
func main() {
timeFmt := "2006-1"
@chrissexton
chrissexton / init.coffee
Created November 19, 2014 18:03
Helpers to facilitate a smoother vim-mode save experience in Atom
# Enable a wq action, we will bind the palette to ':' for access to this
atom.workspaceView.command 'vim-mode-ext:wq', '.editor', ->
editor = atom.workspaceView.getActiveView()
editor.getEditor().save()
editor.trigger('core:close')