Skip to content

Instantly share code, notes, and snippets.

View thealanberman's full-sized avatar
🍸
learning

Alan Berman thealanberman

🍸
learning
  • SF Bay Area
View GitHub Profile
@thealanberman
thealanberman / code.gs
Last active January 22, 2022 09:49
Simple Mattermost Bot via Google Apps Script and Outgoing Webhook
/*************
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 / mac_recommendations.md
Last active August 8, 2023 16:25
My Mac Recommendations

macOS Recommendations

General Utilities

  • Rectangle — a free option for window snapping/arrangement stuff.
  • AltTab — an improved window switcher with some decent customizability
  • Shifty — a macOS "night shift" slider
  • Raycast — Spotlight replacement, somewhat like Alfred, but free and more customizable
  • Better Touch Tool — not free, but worth every penny. Pretty awesome window snapping/arrangement capabilties (like Rectangle but MOAR), and lets you create shortcuts for keyboard/mouse/touchpad/touchbar/etc.
  • Keka — compression utility that handles 7zip, rar, and some other archive formats that don't work natively in macOS.
  • NameChanger — batch file-renamer with a handy intuitive UI
@thealanberman
thealanberman / slice-of-life.gs
Created July 22, 2022 04:26
Google App Script to send a "post a pic" message twice a day
// Randomized posting of 2 messages
// One between between 8am and 3pm
// The other between 3pm and 10pm
function DelayedTrigger() {
// for readability
var minutes = 60 * 1000
// There are 840 minutes between 8am and 10pm
var morningDelay = randomInteger(1,420)
@thealanberman
thealanberman / slice-of-life-slackbot.gs
Created August 9, 2022 20:05
Slice of Life slackbot. Prompts twice a day for everyone in the channel to post a picture.
// INSTRUCTIONS
// Set the Incoming webhook URL in the Script Properties key-value store
// give it the key name "slack_url"
// Set a time-based Trigger of the 'DelayedTrigger' function. Have it trigger at 0800 in the desired timezone
// The script will post 2 messages:
// One between between 8am and 3pm
// The other between 3pm and 10pm
@thealanberman
thealanberman / Chili.md
Last active November 8, 2022 06:18
Chili

Ingredients:

  • 1 pounds lean ground beef
  • 1 (15 ounce) can tomato sauce
  • 1 (14.5 ounce) can diced tomatoes
  • 2 (15 ounce) cans kidney beans, drained and rinsed
  • 1 (15 ounce) can pinto beans, drained and rinsed
  • 1 chopped onion
  • 1 chopped green bell pepper
  • 1/4 teaspoon ground cayenne pepper
  • 1/2 teaspoon white sugar