Skip to content

Instantly share code, notes, and snippets.

alias dots="source ~/.zprofile"
alias edots="vim ~/.zsh_aliases"
alias ll="ls -laF"
# Git
alias gs="git status"
alias gd="git diff"
alias gc="git commit"
@caseyw
caseyw / cloner.sh
Created August 14, 2023 14:51
Clone repos in an organization with gh/jq/bash
#!/bin/bash
# Verify ghcli is installed.
if ! command -v gh >/dev/null 2>&1; then
echo "Install gh first"
exit 1
fi
# Verify jq is installed.
if ! command -v jq >/dev/null 2>&1; then
@caseyw
caseyw / gist:0ac0d9bfaa4883ff05cf048e74c22a9b
Created June 29, 2023 12:21
How do you create a concatenated string of your assets in a manifest.json?
jq -r 'map({(.name): (.assets | join(", "))}) | add' manifest.json
@caseyw
caseyw / gist:debbf77f9ce6a7e57e39dd0d385323a9
Created January 28, 2023 13:41
wp cli find the admin URL of a site using wps-hide-login
wp @production option get whl_page
@caseyw
caseyw / gist:409767713ef471747833da7ca9e1034a
Created January 21, 2023 14:12
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY XXXXXXXXXXXX
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys XXXXXXXXXXXX
sudo apt-get update
@caseyw
caseyw / gist:12e63309e0123ba3552f0abf477be309
Created January 21, 2023 14:11
Adding a new domain to existing let's encypt / certbot
sudo certbot -d example.com,www.example.com --expand
@caseyw
caseyw / gist:015abcfb5af4debceeccac85897b72c7
Created January 20, 2023 13:07
grumphp - the input device is not a tty
TL;DR
We were running EXEC_GRUMPHP_COMMAND with docker compose, and didn't have a "-T" in there.
Updated it on the affected machines and followed up with a `vendor/bin/grumphp git:deinit && vendor/bin/grumphp git:init`
e.g.
`EXEC_GRUMPHP_COMMAND: 'docker-compose run -T --rm --no-deps SERVICE_NAME'`
ConfigOverrideItemMaxQuantity=(ItemClassString="PrimalItemAmmo_TranqDart_C",Quantity=(MaxItemQuantity=200, bIgnoreMultiplier=true))

Keybase proof

I hereby claim:

  • I am caseyw on github.
  • I am caseyw (https://keybase.io/caseyw) on keybase.
  • I have a public key ASCcye-SugafdnLuK2G0aTiosc-uA4g8VuUoFZlSQlD38Qo

To claim this, I am signing this object:

@caseyw
caseyw / MobileDetect.pm
Created January 16, 2018 19:58
General optimizations for MobileDetect perl
# Copyright: 2014 by Sebastian Enger
# Email: sebastian.enger at gmail - com
# Web: Buzz News on http://www.buzzerstar.com/
# Licence: Perl
# All rights released.
package MobileDetect;
#
# MobileDetect.pm - Perl detection for mobile phone and tablet devices
#
# Thanks to: