Skip to content

Instantly share code, notes, and snippets.

Avatar
🍸
learning

Alan Berman thealanberman

🍸
learning
  • SF Bay Area
View GitHub Profile
@thealanberman
thealanberman / mac_recommendations.md
Last active Mar 14, 2021
My Mac Recommendations
View mac_recommendations.md

macOS Recommendations

GUI Apps

  • Better Touch Tool not free, but worth every penny. Pretty awesome window snapping/arrangement capabilties, and lets you create keyboard/mouse/touchpad/touchbar/just about every other thing you can think of macros.
  • Day-O a slightly improved calendar for the top menu bar.
  • Objective-See Utilities decent malware guards that don't bog down your system
  • Choosy also not free, but if you have more than one browser or if you plan to juggle multiple browser profiles on a work machine, this can be configured to do things like "always open twitter in my personal profile" and "always open mycompany.com in the work profile"
  • AltTab an improved window switcher with some decent customizability
  • Keka handles 7zip, rar, and some other archive formats that
View bash_retries_with_timeout.sh
# Lifted from https://stackoverflow.com/a/12321815
# Adjust command and retries as needed
NEXT_WAIT_TIME=0
RETRIES=5
until command || [[ "${NEXT_WAIT_TIME}" == "${RETRIES}" ]]; do
sleep $(( NEXT_WAIT_TIME++ ))
done
@thealanberman
thealanberman / code.gs
Last active Sep 5, 2020
Simple Mattermost Bot via Google Apps Script and Outgoing Webhook
View code.gs
/*************
MATTERMOST OUTGOING WEBHOOK BOT
INSTRUCTIONS
Create a Google Spreadsheet
In column A of Sheet1, put a list of however many potential responses you'd like.
@thealanberman
thealanberman / ffmpeg_audio_split.sh
Last active Aug 7, 2019
Helps split a full album audio file into individual tracks with FFmpeg
View ffmpeg_audio_split.sh
#!/usr/bin/env bash
# set -euxo pipefail # uncomment this for debugging
###################################
# INSTRUCTIONS
# 1. Set Artist, Album, Timestamps and Track Names below
# 2. Save split.sh into the folder with file to be split
# 3. ./split.sh <m4a file to be split>
###################################
@thealanberman
thealanberman / self_help.sh
Created Mar 17, 2019
Self documenting Bash script
View self_help.sh
#!/usr/bin/env bash
if [[ ${*} =~ help|-h || ${#} == 0 ]]; then cat <<HELP_USAGE | sed "s/^#? //"
#? USAGE
#? ======
#? Anywhere in your script:
#?
#? if [[ $* =~ help|-h || $# == 0 ]]; then cat <<HELP_USAGE | sed "s/^#? //"
#? #? Documentation lines prefixed with '#? '
#? HELP_USAGE
@thealanberman
thealanberman / mattermost-bulk-emoji-uploader.sh
Created Sep 7, 2018
Bulk Emoji Uploader for Mattermost 5.x (v4 api)
View mattermost-bulk-emoji-uploader.sh
#!/usr/bin/env bash
if [[ -d "${1}" ]]; then
dir="${1}"
else
echo "USAGE: $(basename "${0}") /path/to/emoji/folder"
exit
fi
read -r -p "Server Hostname: " MMSERVER
View Keto Goodies Blueberry Muffin Recipe.md

Keto Goodies Blueberry Muffin Recipe

Yields 12 muffins

Ingredients

  • 3 cups almond flour
  • 1/2 cup natural sweetener (we use a blend of erythritol and oligosaccharides)
  • 4 oz sour cream
  • 4 large eggs
View Instant Pot Butter Chicken.md

Instant Pot Butter Chicken

Serves four.

Ingredients

  • 1 (14-ounce) can diced tomatoes (do not drain)
  • 1 tablespoon minced garlic
  • 1 tablespoon minced ginger
  • 1 teaspoon ground turmeric
View keybase.md

Keybase proof

I hereby claim:

  • I am thealanberman on github.
  • I am thealanberman (https://keybase.io/thealanberman) on keybase.
  • I have a public key ASC4BO9SHRufBgjW79nTKO1Vfcdob8aadx2GcBADT9-p-go

To claim this, I am signing this object:

@thealanberman
thealanberman / Amazon Search Tweaks Userscript
Last active Oct 5, 2017
Amazon — focus on search box on page load. Jump to search box via '/' key. Unfocus with Esc key. https://userscripts-mirror.org/
View Amazon Search Tweaks Userscript
// ==UserScript==
// @name Amazon Search Tweaks
// @namespace https://gist.github.com/thealanberman/e8b902b8b19636a7c4b08afb93c46140
// @description Focus on search box on page load. Jump to search box via '/' key. Unfocus with Esc key.
// @include http://amazon.*/
// @include https://amazon.*/
// @include http://*.amazon.*/
// @include https://*.amazon.*/
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js
// @version 1