Skip to content

Instantly share code, notes, and snippets.

View NrupM's full-sized avatar
🦴

Mary Northrup NrupM

🦴
View GitHub Profile
@NrupM
NrupM / postgres.md
Created August 18, 2025 04:04 — forked from phortuin/postgres.md
Set up postgres + database on MacOS (M1)

Based on this blogpost.

Install with Homebrew:

$ brew install postgresql@14

(The version number 14 needs to be explicitly stated. The @ mark designates a version number is specified. If you need an older version of postgres, use postgresql@13, for example.)

@NrupM
NrupM / current-dir-in-iterm-tab-title.sh
Created September 9, 2019 00:33 — forked from phette23/current-dir-in-iterm-tab-title.sh
Set the iTerm tab title to the current directory, not full path.
# put this in your .bash_profile
if [ $ITERM_SESSION_ID ]; then
export PROMPT_COMMAND='echo -ne "\033];${PWD##*/}\007"; ':"$PROMPT_COMMAND";
fi
# Piece-by-Piece Explanation:
# the if condition makes sure we only screw with $PROMPT_COMMAND if we're in an iTerm environment
# iTerm happens to give each session a unique $ITERM_SESSION_ID we can use, $ITERM_PROFILE is an option too
# the $PROMPT_COMMAND environment variable is executed every time a command is run
# see: ss64.com/bash/syntax-prompt.html
{
"homepage": {
"heading": "Qantas Cars",
"subheading": "Powered by the sun with the best safety record on the planet",
"heroImageUrl": "https://drive.google.com/uc?id=1svw9VdyX4fyRHd1kggq0akDSafmdOS7L"
},
"faqs": [
{
"title": "How can I check my estimated delivery window?",
"body": "Model 3 reservation holders can check their latest delivery timing estimate in their Tesla Account."
@NrupM
NrupM / HTML5 canvas.md
Last active September 11, 2017 18:28
HTML5 canvas lightning talk

<canvas> is an HTML element used to draw graphics using scripts (usuallt JavaScript)

The HTML <canvas> element is only a container for graphics. Canvas has several methods for drawing paths, boxes, circles, text and for adding images.

Basic usage

The <canvas> element

  <canvas width='150' height='150'></canvas>
@NrupM
NrupM / ALEXA.md
Created August 30, 2017 05:25 — forked from mdang/ALEXA.md
Lesson: Alexa
@NrupM
NrupM / _strip!.md
Last active August 30, 2017 03:24
Remove leading or trailing whitespace for good!

Ruby Method: str.strip!

DataType: String

The strip! command has magical powers. It is a string method that replaces the original string absent any leading or trailing whitespace.

Example: This is showing the text input values submitted when a new user signs up. Our particular user signs up for web apps with reckless abandon - inputting messy and careless strings with nonsensical whitespace.