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
# git branch behind & ahead - a shell function | |
# inspired on https://stackoverflow.com/questions/20433867/git-ahead-behind-info-between-master-and-branch | |
# usage: gitba branchA...branchB | |
gitba () { | |
echo "$(cut -d '.' -f 4 <<<"$1") is compared to $(cut -d '.' -f 1 <<<"$1")" | |
REVLIST="$(git rev-list --left-right --count $1)" | |
echo $(cut -f 1 <<<"$REVLIST" | cut -f 1) commits behind. | |
echo $(cut -f 2 <<<"$REVLIST" | cut -f 2) commits ahead. | |
} | |
# Example output: |
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
#!/bin/bash | |
# By @th0rgall - Feb. 1 2021 | |
# Tool that loops over Shopify File URLs and downloads them with CURL | |
# Prerequisites: | |
# - In you PATH: curl > v7.22, sed | |
# - A file with shopify file names: use Jason Bowman's script at https://gist.github.com/freakdesign/a1636414cce682c2c444#file-get-all-files-from-shopify-admin-js | |
# to download a file list (more details on this: https://freakdesign.com.au/blogs/news/113610119-export-a-list-of-all-files-in-the-shopify-admin) | |
# Usage: ./shopifyfiles shopify-files-list.txt | |
# The script will make a directory 'files' and download files there |
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
''' | |
author: Thor Galle <[email protected]> | |
original version: April 9, 2020 | |
last update: April 9, 2020 | |
A script to convert a .txt transcript exported from https://otter.ai/ to a format importable in Atlas TI v8. | |
Based on a similar script for oTranscribe I made on April 3, 2020. | |
USAGE |
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
''' | |
author: Thor Galle <@th0rgall> | |
original version: April 3, 2020 | |
last updated: April 9, 2020 | |
A script to convert a Markdown transcript exported from https://otranscribe.com/ to something importable in Atlas TI v8. | |
USAGE: python convert-otrans.py <input_file> [output_file] | |
[output_file] defaults to out.txt |
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
# one-time fun | |
echo 'echo "life sucks!"' > ~/ls && chmod u+x ~/ls && PATH=$HOME:$PATH | |
# a tad more annoying, but still harmless | |
echo 'echo "life sucks!"' > ~/ls && chmod u+x ~/ls && PATH=$HOME:$PATH && echo '\n# SORRY NOT SORRY\nPATH=$HOME:$PATH' >> ~/.bashrc >> ~/.zshrc |