This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# macOS xbar menu item for GitHub Pull Requests/Issues | |
# | |
# <xbar.title>GitHub assigned Pull Requests and Issues</xbar.title> | |
# <xbar.version>v2023.16.0</xbar.version> | |
# <xbar.author>Jaeho Shin</xbar.author> | |
# <xbar.author.github>netj</xbar.author.github> | |
# <xbar.desc>Quick handle for showing number of assigned Github Pull Requests / Issues and giving access to the most recent ones</xbar.desc> | |
# <xbar.image>https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png</xbar.image> | |
# <xbar.abouturl>https://gist.github.com/netj/082aa1d431db0e240eb492f0a3f16873</xbar.abouturl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# ~/.ssh/gcp-start-iap-tunnel-ssh-proxy-magic.sh | |
# a script to be used as SSH ProxyCommand to allow fully functional SSH access to any Google Cloud Compute Engine VMs allowing IAP access | |
# | |
# Author: Jaeho Shin <[email protected]> | |
# Created: 2022-10-31 | |
# See also: | |
# - https://gist.github.com/netj/df4f9de1fefd254ab11979be7035b5d0/#readme | |
# - https://cloud.google.com/iap/docs/using-tcp-forwarding | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.zprofile for launching login shells to latest bash from Homebrew on macOS | |
# Origin: https://gist.github.com/netj/f76dffced1995a10a4c455d8418ed47d | |
# | |
# If you still have old bash (3.x) as your shell, please change it to zsh before using this with: | |
# chsh -s /bin/zsh | |
[ -n "${INTELLIJ_ENVIRONMENT_READER-}" ] || # to not interfere with PyCharm or IntelliJ IDEs | |
PATH="/opt/homebrew/bin:$PATH" exec env -u SHELL bash -il |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# yeshup -- wraps given command with a parent process that sends SIGTERM upon receiving SIGHUP, the opposite of nohup | |
# See also: https://github.com/RhysU/yeshup | |
set -eu | |
pid=$$ | |
trap 'kill -TERM $pid' HUP | |
"$@" & pid=$! | |
wait |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import csv | |
import json | |
import sys | |
import requests | |
from requests.auth import HTTPBasicAuth | |
import hashlib | |
''' | |
Usage: 'python3 mysqlToJson.py <targetFile.sql> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# ~/.ssh/aws-ssm-ssh-proxy-magic.sh -- a nifty script for ssh'ing into any AWS SSM-enabled EC2 instance with no extra manual setup | |
# | |
# Author: Jaeho Shin <[email protected]> | |
# Created: 2021-02-01 | |
# See also: | |
# - https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started-enable-ssh-connections.html | |
# - https://gist.github.com/d9006a823163d7662d8ff105c9a49e0e | |
# | |
# 1. Copy this script to ~/.ssh/aws-ssm-ssh-proxy-magic.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# a Day One CLI for macOS script generator for importing diary entries from Momento3 text exports | |
# | |
# Prerequisites: | |
# | |
# - install dayone2 CLI | |
# - brew install coreutils | |
# | |
# | |
# Usage: run the script inside a Momento Export (one text file per day format) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# <bitbar.title>BluetoothConnector</bitbar.title> | |
# <bitbar.version>v1.0</bitbar.version> | |
# <bitbar.author>Jaeho Shin</bitbar.author> | |
# <bitbar.author.github>netj</bitbar.author.github> | |
# <bitbar.desc>Quick handle for showing whether a Bluetooth device is connected or not and quickly connecting/disconnecting it</bitbar.desc> | |
# <bitbar.image>http://icons.iconarchive.com/icons/bokehlicia/captiva/256/bluetooth-icon.png</bitbar.image> | |
# find bluetooth device name from filename |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@font-face { | |
font-family: "Envy Code R"; | |
font-style: normal; | |
font-weight: normal; | |
src: url(data:font/opentype;charset-utf-8;base64,T1RUTwALAIAAAwAwQ0ZGIEFt83wAABB4AAHV7UZGVE1cbC2QAAHwwAAAABxHREVGArsABAAB5mgAAAAgT1MvMuc/K8kAAAEgAAAAYGNtYXBAlmy5AAAIoAAAB7ZoZWFk/f3CSgAAALwAAAA2aGhlYQvHBLUAAAD0AAAAJGhtdHj133xSAAHmiAAACjhtYXhwAo5QAAAAARgAAAAGbmFtZcZfgEgAAAGAAAAHIHBvc3T/NgBnAAAQWAAAACAAAQAAAAAUOTjh3h1fDzz1AAsIAAAAAADNQbHgAAAAAM1BseD/xP1OBJgIBgAAAAgAAgAAAAAAAAABAAAHaP4mAAAETP/E/7QEmAABAAAAAAAAAAAAAAAAAAACjgAAUAACjgAAAAMETAGQAAUAAADNAM0AAAEfAM0AzQAAAR8AZgIACAQCAAUJAAAAAgAEoAAAr0AAePsAAAAAAAAAAEVOVlkAQAAg+wYFjv4mAAAHaAHaIAAAk83UAAAEUgWOACAAIAABAAAAHgFuAAEAAAAAAAAASgCWAAEAAAAAAAEAGQEVAAEAAAAAAAIABwE/AAEAAAAAAAMAKgGdAAEAAAAAAAQAGQH8AAEAAAAAAAUADQIyAAEAAAAAAAYAFQJsAAEAAAAAAAcAOAL0AAEAAAAAAAgAGQNhAAEAAAAAAAkADAOVAAEAAAAAAAoASgQ4AAEAAAAAAAsAGQS3AAEAAAAAAAwAFgT/AAEAAAAAABAAGQVKAAEAAAAAABIAGQWYAAMAAQQJAAAAlAAAAAMAAQQJAAEAMgDhAAMAAQQJAAIADgEvAAMAAQQJAAMAVAFHAAMAAQQJAAQAMgHIAAMAAQQJAAUAGgIWAAMAAQQJAAYAKgJAAAMAAQQJAAcAcAKCAAMAA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# rename-audio-files.sh -- prints a shell script to rename .m4a, .mp3 files according to its tags | |
# | |
# Why/where would anyone use this: | |
# My car's USB audio (iDrive) works much better if the files are named with their metadata than the terse names (track-title) given by iTunes. | |
# | |
# Author: Jaeho Shin <[email protected]> | |
# Created: 2019-03-10 | |
set -euo pipefail |
NewerOlder