Skip to content

Instantly share code, notes, and snippets.

View acapps's full-sized avatar

Alan Capps acapps

  • Zipwhip
  • Seattle, WA
View GitHub Profile
@btoews
btoews / github_keychain.sh
Created August 14, 2015 18:43
Store GitHub access token in keychain
#!/bin/bash
echo -n "GitHub username: "
read username
echo -n "GitHub personal access token: "
read token
echo "Storing GitHub access token in keychain."
security add-generic-password -s github_access_token -a $username -w $token
@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
@josiahcarlson
josiahcarlson / rate_limit.py
Last active February 25, 2022 14:33
Rate limiting with Redis primarily using Lua scripting
'''
rate_limit.py
Written May 7-8, 2014 by Josiah Carlson
Released under the MIT license.
Offers a simple interface for offering rate limiting on a per second, minute,
hour, and day basis. Useful for offering varying rate limits depending on user
behavior. Sliding window based limits offer per minute, hour, and day limits