Skip to content

Instantly share code, notes, and snippets.

View TheLandolorien's full-sized avatar

Lando Toothman TheLandolorien

View GitHub Profile
@TheLandolorien
TheLandolorien / .gitmessage
Last active May 24, 2022 21:14
A Git Commit Message Template to Guide Great, Consistent Messages
# <TYPE>: (If applied, this commit will...) <SUBJECT> (Max 50 char)
# Concisely describe the change
# Include any plugin-required text (e.g. Jira issue)
# |<---- Using a Maximum Of 50 Characters ---->|
# Provide additional explanation about the change (e.g. why?)
# |<---- Using a Wrap Maximum Of 72 Characters ---->|
User sfdxUser = [SELECT Id, Name, TimeZoneSidKey, UserPreferencesLightningExperiencePreferred FROM User WHERE Name='User User' LIMIT 1];
sfdxUser.TimeZoneSidKey = 'America/New_York';
update sfdxUser;
@TheLandolorien
TheLandolorien / .bash_path_additions
Last active July 30, 2021 15:17
Bash PATH Safe Additions
# Add new directories to PATH without duplicating on shell reload
# e.g. `source ~/.bash<SCRIPT_SUFFIX>`
[[ ":$PATH:" =~ ":<PATH_ADDITION>:" ]] || PATH="<PATH_ADDITION>:$PATH"
#!/bin/bash
CONFIG_PATH="${HOME}/.inaudible/"
TABLES_PATH="${CONFIG_PATH}/tables/"
usage() {
echo "Usage: ${BASH_SOURCE[0]} <BOOK_FILE|BOOKS_DIRECTORY>"
if [[ ! -z "$1" ]]; then
echo ""
const jq = document.createElement('script');
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
$ = jQuery.noConflict();
const delay = ms => new Promise(res => setTimeout(res, ms));
var startingIndex = 0;
var delayInSeconds = 2;
@TheLandolorien
TheLandolorien / Sublime Text.xml
Created August 29, 2018 18:15
PyCharm (IntelliJ) Sublime Text Based Keymap
<keymap version="1" name="Sublime Text" parent="Mac OS X 10.5+">
<action id="AddToFavoritesPopup" />
<action id="ChangesView.Diff" />
<action id="CheckinProject" />
<action id="CompareTwoFiles" />
<action id="Console.TableResult.CloneRow" />
<action id="Console.TableResult.NavigateAction">
<keyboard-shortcut first-keystroke="f4" />
</action>
<action id="Database.OpenDbStorageAction">
@TheLandolorien
TheLandolorien / proxy.sh
Created August 29, 2018 18:14
Bash Proxy Script for Corporate Networks
#!/bin/bash
PROXY=<PROXY>
BYPASS_PROXY="localhost,127.0.0.1,<BYPASS_PROXY>"
ENTERPRISE_GITHUB="<ENTERPRISE_GITHUB>"
if [[ "$1" = "on" ]]; then
# Configure CLI Proxy Settings for Corporate Network
echo -n "Turning on proxy..."
@TheLandolorien
TheLandolorien / git-commits-log-formatter.sh
Last active September 10, 2021 19:00
Configure git to pretty print logs
git config --global alias.commits "log --abbrev-commit --pretty=format:'%C(red)%h%Creset -%C(yellow)%d%Creset %s %C(green)%cd (%cr)%Creset %C(bold blue)<%an>%Creset' --date=format:'%a %b %d, %Y %H:%M %p'"
@TheLandolorien
TheLandolorien / git-remove-files-from-commit.sh
Created August 29, 2018 18:02
Remove files from previous git commit
#--------------------------------------------------
# How to Split git commits
#--------------------------------------------------
# Checkout specific commit
git cherry-pick <commit>
# Reset to previous commit
git reset --soft HEAD^
@TheLandolorien
TheLandolorien / git-pull-pr.sh
Created August 29, 2018 17:54
Pull GitHub PR based on Branch and PR#
#!/bin/bash
if [[ "$#" -eq 2 ]]; then
TARGET_BRANCH="$1"
ID="$2"
BRANCH_NAME="PR-${ID}"
git checkout $TARGET_BRANCH
git branch -D $BRANCH_NAME
git fetch upstream pull/$ID/head:$BRANCH_NAME