Skip to content

Instantly share code, notes, and snippets.

View stephenamills's full-sized avatar

Stephen Mills stephenamills

  • Los Angeles
View GitHub Profile
@stephenamills
stephenamills / github.sh
Last active October 27, 2024 22:47
Retrieve information from GitHub
gh api "/search/users?q=keyword+type:org" --paginate --jq '.items[].login'
ghsr --owner -L 300 --archived=false --json url,description --jq '.[] | (.url | ascii_downcase) + " # " + (.description // "" | gsub("\n"; " ") | gsub("\\s+"; " ") | sub("^\\s+"; "") | sub("\\s+$"; ""))'
ghsr --owner -L 300 --include-forks=only --archived=false --json url,description --jq '.[] | (.url | ascii_downcase) + " # " + .description'
for owner in googlecloudplatform googleapis google google-github-actions googleworkspace; do
ghsr --owner $owner vertex --match name,description,readme --archived=false --json url,description -L 300 --jq '.[] | (.url | ascii_downcase) + " # " + (.description // "" | gsub("\n"; " ") | gsub("\\s+"; " ") | sub("^\\s+"; "") | sub("\\s+$"; ""))'
done
@stephenamills
stephenamills / go.sh
Last active September 18, 2024 05:15
Packages for different programming languages
ghsr --language go
ghsc --filename 'go.mod' 'kube'
@stephenamills
stephenamills / dotfiles
Last active August 10, 2024 09:14
Create links to my dotfiles
ln -sf ~/projects/zsh/dotfiles/{.argc,.gitconfig,.gitignore.hushlogin,.zprofile,.zshrc,Brewfile,Gofile,Npmfile,Pythonfile,Rustfile} ~/
ln -f "$HOME/Library/Application Support/Code/User/keybindings.json" ~/projects/zsh/dotfiles/.vscode/keybindings.json
ln -f "$HOME/Library/Application Support/Code/User/settings.json" ~/projects/zsh/dotfiles/.vscode/settings.json
mkdir -p ~/.config/direnv
ln -f ~/projects/zsh/dotfiles/.config/direnv/direnv.toml ~/.config/direnv/direnv.toml
mkdir -p ~/.config/nix
ln -f ~/projects/zsh/dotfiles/.config/nix/nix.conf ~/.config/nix/nix.conf
@stephenamills
stephenamills / cisco tacacs ldap kerberos
Last active August 7, 2024 05:06
TACACS+ — Cisco IOS & Fortinet FortiOS, Linux tac_plus, Microsoft AD
configure terminal
aaa new-model
aaa authentication login default local group tacacs+
aaa authentication login telnet group tacacs+ local
aaa authentication login console group tacacs+ local
aaa authentication enable default group tacacs+ enable
aaa authorization exec default group tacacs+ local
@stephenamills
stephenamills / parser.hs
Created September 12, 2013 09:53
preliminary parser for Azure.
module Parser where
import Text.ParserCombinators.Parsec hiding (spaces)
import System.Environment (getArgs)
import Control.Monad (liftM)
{- Azure's AST
TODO: handle escaped strings, different number bases -}
data Clj
= Atom String -- symbol/special form
| String String -- A string
| Number Number -- A number (hex, dec, oct)