Skip to content

Instantly share code, notes, and snippets.

View bitmvr's full-sized avatar

Jesse Riddle bitmvr

View GitHub Profile
@bitmvr
bitmvr / dtmf--mary-had-a-little-lamb.js
Last active April 3, 2024 20:16
Mary Had A Little Lamb - DTMF
// Navigate to http://onlinetonegenerator.com/dtmf.html
// Open DevTools - Console
// Paste the Code
// Press Enter
// Provide the number of milliseconds the default tone should hold for
var short = 250;
var long = short * 2;
function sleep(ms) {
@bitmvr
bitmvr / get-jq.sh
Created February 4, 2019 21:36
A script to temporarily install jq for use in Bash scripting
#!/usr/bin/env bash
getjq::prep(){
TEMP_DIR="$(mktemp -d jq-download.XXXXXXXXXX)"
cd $TEMP_DIR
if [ $? -ne 0 ]; then
echo "$0: Cannot change directory to $TEMP_DIR, exiting..."
exit 1
fi
}
@bitmvr
bitmvr / slack-emoji-downloader.sh
Last active February 8, 2019 15:21
Slack Emoji Downloader
#!/usr/bin/env bash
slacked::timestamp(){
date -u +"%Y%m%dT%H%M%SZ"
}
input_file="../emoji-image-list.json"
download_directory='emoji_cache'
mkdir -p "$download_directory"
@bitmvr
bitmvr / Salesforce-Tower--Indianapolis.txt
Created February 20, 2019 14:41
Salesforce Tower - Indianapolis
| |
_|_|_
/_____\
|-=====-|
|-------|
|-------|
|-------|
|-------|
|-------|
|-------|
@bitmvr
bitmvr / jqi.sh
Last active November 18, 2019 20:58
The portable jq installer for the scripting elite.
#!/usr/bin/env bash
PATH=./jqi-tmp:$PATH
jqi::getLatestTag(){
local response
response="$(curl -s https://github.com/stedolan/jq/releases/latest)"
response="${response##*tag/}"
response="${response%%\">*}"
echo "$response"
@bitmvr
bitmvr / ghe-version.md
Last active March 18, 2019 19:56
Github Enterprise Version Bookmarklet

GitHub Enterprise Version

javascript:(function(){
  anchors = document.querySelectorAll('a');
  for (anchor of anchors) {
    if (anchor.title.includes('Enterprise Version')) {
      alert(anchor.title);
    }
 }
@bitmvr
bitmvr / cwdmon
Created April 4, 2019 15:05
Current Working Directory Monitor
#!/usr/bin/env bash
function cwdmon::getPIDsByAppName(){
appName="${1}"
pgrep -a $appName
}
function cwdmon::getAllCWDs(){
for PID in $(cwdmon::getPIDsByAppName 'bash'); do
lsof -p "$PID" | grep -i "cwd" | awk '{ print $9}'
@bitmvr
bitmvr / pingr.sh
Created April 4, 2019 15:18
Ping multiple websites by providing pingr a file.
#!/usr/bin/env bash
while IFS='' read -r line || [[ -n "$line" ]]; do
printf '=%.0s' {1..100}
printf '\n'
echo "${line}"
printf '=%.0s' {1..100}
printf '\n'
ping -q -c 1 $line
printf '\n'
@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]}"
@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}"
}