Skip to content

Instantly share code, notes, and snippets.

View npazo's full-sized avatar

Nick Pazoles npazo

  • Sports Reference LLC
  • Chicago-adjacent
View GitHub Profile
@flomotlik
flomotlik / functions.sh
Created September 28, 2016 11:22
Pull Request handling
# Checkout a PR from the current repo
function copr { git fetch origin pull/$1/head:pr-$1; git checkout pr-$1; }
# Get the current PR from the branch name
function current_pr {
git rev-parse --abbrev-ref HEAD | grep -oE "\d+"
}
# Update the PR
function upr {
@milanaleksic
milanaleksic / functions.sh
Created May 12, 2017 08:45
List all known functions
# as long as your functions are located in files mentioned in the "in" clause of the for below
# and as long as functions are following the same pattern of "function_name() {" with a single comment above,
# the function below will list them all in a nice way
# lists all known functions
functions() {
for f in ~/.dockerfunc ~/.functions ~/bash/.extra_*
do
@ttscoff
ttscoff / sizes.rb
Last active July 12, 2021 03:33
sizes: Calculate and sort all filesizes for current folder
#!/usr/bin/env ruby
# Sizes - Calculate and sort all filesizes for current folder Includes
# directory sizes, colorized output Brett Terpstra 2019 WTF License
VERSION = "1.0.1"
require 'shellwords'
# Just including term-ansicolor by @flori and avoiding all the
# rigamarole of requiring multiple files when it's not a gem... - Brett
#
@dex4er
dex4er / ssm.sh
Last active March 6, 2025 15:26
ssm
#!/usr/bin/env bash
## ssm
##
## Copyright (c) 2023 Piotr Roszatycki <[email protected]>, MIT
set -e
if ! command -v aws >/dev/null; then
echo "Needs aws command."