Skip to content

Instantly share code, notes, and snippets.

View bitmvr's full-sized avatar

Jesse Riddle bitmvr

View GitHub Profile
@bitmvr
bitmvr / keyboard_shortcuts__bash.md
Last active October 25, 2019 14:36
Keyboard Shortcuts - Bash

Keyboard Shortcuts - Bash

Command Editing Shortcuts

  • Ctrl + a – go to the start of the command line
  • Ctrl + e – go to the end of the command line
  • Ctrl + k – delete from cursor to the end of the command line
  • Ctrl + u – delete from cursor to the start of the command line
  • Ctrl + w – delete from cursor to start of word (i.e. delete backwards one word)
  • Ctrl + y – paste word or text that was cut using one of the deletion shortcuts (such as the one above) after the cursor
@bitmvr
bitmvr / default_writes.md
Last active October 24, 2019 17:31
Default Writes for MacOS

Default Writes

Screenshot.app

Default Location

defaults write com.apple.screencapture location "~/path/to/desired/directory"
@bitmvr
bitmvr / guitar-maintenance.md
Last active October 15, 2019 19:49
Guitar Maintenance

Guitar Maintenance

Remove Guitar Strings

Turn the string's tuner until the tension on the string is completely removed. Next, use wire cutters to cut the strings and remove them from the bridge and the tuning peg.

Cleaning

To clean your guitar's fretboard , you will want to remove the strings from the guitar itself. Please see the Removing Strings section to learn how remove the strings from your guitar.

@bitmvr
bitmvr / irv-hal-count.js
Last active July 25, 2019 19:41
Irvington Halloween Counter
#!/usr/bin/env node
const puppeteer = require('puppeteer');
const submissions = {
one: "https://www.facebook.com/irvhalloween/photos/pcb.10157648652552160/10157648601497160/?type=3&theater",
two: "https://www.facebook.com/irvhalloween/photos/pcb.10157648652552160/10157648601502160/?type=3&theater",
mark : "https://www.facebook.com/irvhalloween/photos/a.451834352159/10157648601317160/?type=3&theater",
four: "https://www.facebook.com/irvhalloween/photos/pcb.10157648652552160/10157648602242160/?type=3&theater",
five: "https://www.facebook.com/irvhalloween/photos/pcb.10157648652552160/10157648602677160/?type=3&theater",
@bitmvr
bitmvr / got_episode_durations.sh
Created June 19, 2019 14:03
Get the duration for all GOT episodes.
#!/usr/bin/env bash
WIKIPEDIA_ENDPOINT='https://en.wikipedia.org/'
getEpisodes(){
local route='/wiki/List_of_Game_of_Thrones_episodes'
curl -sL "${WIKIPEDIA_ENDPOINT}${route}" | pup '.wikiepisodetable tr > td:nth-of-type(2) a attr{href}'
}
getRuntime(){
@bitmvr
bitmvr / S4M.md
Last active November 14, 2023 15:02
S4M - My default system configuration

S4M

S4M is a numeronym for SYSTEM. S4M is my default system configuration for *NIX based workstations.

Operating System Agnostic

Dot Files

.bash_profile

@bitmvr
bitmvr / got_episode_duration.sh
Last active April 16, 2019 23:50
Game of Thrones - Episode Duration Script
#!/usr/bin/env bash
WIKIPEDIA_ENDPOINT='https://en.wikipedia.org/'
getEpisodes(){
local route='/wiki/List_of_Game_of_Thrones_episodes'
curl -sL "${WIKIPEDIA_ENDPOINT}${route}" | pup '.wikiepisodetable tr > td:nth-of-type(2) a attr{href}'
}
getRuntime(){
@bitmvr
bitmvr / prefix-bash-line.sh
Last active January 6, 2024 14:02
Add Text to beginning of any line that doesn't begin with #
sed -E 's/(^[^#].*$)/INSERT_TEXT_HERE \1/'
@bitmvr
bitmvr / tea.sh
Created April 4, 2019 15:23
Tag Erasing Apparatus (TEA) - Quickly remove git tags locally and remotely.
#!/usr/bin/env bash
# TEA: Tag Erasing Apparatus
tag=$1
function delete_local_tag() {
git tag -d "${tag}"
}
@bitmvr
bitmvr / semver
Created April 4, 2019 15:20
Parse SEMVER in Bash
#!/usr/bin/env bash
SEMANTIC_VERSION='1.2.3'
SEMVER_ARRAY=(${SEMANTIC_VERSION//./ })
echo "MAJOR: ${SEMVER_ARRAY[0]}"
echo "MINOR: ${SEMVER_ARRAY[1]}"
echo "PATCH: ${SEMVER_ARRAY[2]}"