Skip to content

Instantly share code, notes, and snippets.

View unrelentingfox's full-sized avatar

Dustin unrelentingfox

View GitHub Profile
unrelentingfox / skhdrc
Last active May 8, 2024 21:41
This configuration rings an alarm bell every time you use the wrong shift key. I am experiencing pain in my left pinky, probably because I rely completely on the left shift key for everything. I created this configuration as a way to teach myself to use the right shift key.
# Keyboard event codes 0x00 found at:
# Block using left shift for left half of the keyboard
lshift - 0x32 : osascript -e "beep" # `
lshift - 1 : osascript -e "beep"
lshift - 2 : osascript -e "beep"
lshift - 3 : osascript -e "beep"
lshift - 4 : osascript -e "beep"
lshift - 5 : osascript -e "beep"
lshift - 6 : osascript -e "beep"
unrelentingfox /
Last active August 30, 2023 21:21
A list of one liner bash commands that I found useful and would like to remember
# Find all files installed with a package e.g. tilda
dpkg -L tilda
# Get the size of a file
du -sh file_path
# Get the summary of disk usage of currect directory, human readable, with total, sorted by size
du -shc * | sort -h
# Show more context in grep
unrelentingfox /
Last active June 18, 2022 19:25
A python script that queries all of your historic trades and calculates the average price you purchased coins at. This was a quick script based on the examples found here: I am open to feedback!!
import base64
import hashlib
import hmac
import json
import os
import requests
import time
import urllib.parse
unrelentingfox /
Created June 23, 2021 06:37
An example of how you can use the facebook api to populate a google sheet.
function main() {
let accessToken = "YOUR_ACCESS_TOKEN"
let fields = "account_id,account_name,date_start,date_stop,impressions,spend"
let accountIds = getAccountIds(accessToken)
let jsonData = getAdInsights(accountIds, fields, accessToken)
let sheet = SpreadsheetApp.getActiveSheet()
let dataKeys = Object.keys(jsonData[0])
let dataArray = convertToArray(dataKeys, jsonData)
unrelentingfox /
Last active April 22, 2021 01:05
Quick 7z based directory locking script. I created this because I want an easy way to quickly encrypt and decrypt a directory.
USAGE_TEXT="Usage: <command> target
lock Expects target to be a directory. This directory will be compressed
with a password using 7z removing the original directory afterwards.
unlock Expects target to be a 7z compressed file. Unlocks the given
unrelentingfox /
Last active April 19, 2021 20:57
A script to use for dynamically installing a tag version of Neovim.
if [ -z "$1" ]
alias pcat='pygmentize -g'
alias chrome='google-chrome-stable'
alias gfr='git svn fetch; git svn rebase'
alias work='cd ~/workspace/'
alias home='cd ~'
alias bprops='vim /etc/cwan/titan/'
alias bpropsd2='vim /etc/cwan/titan/d2/'
alias rm='rm -v'
alias mv='mv -v'
alias cp='cp -v'
<code_scheme name="Titan (hand entered)" version="173">
<option name="SOFT_MARGINS" value="120" />
<option name="SPACE_AROUND_TYPE_BOUNDS_IN_TYPE_PARAMETERS" value="false" />
<option name="BLANK_LINES_AROUND_INITIALIZER" value="0" />
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
<SqlCodeStyleSettings version="2">
<option name="ALIAS_CASE" value="1" />
# For use when you need trace level logs
status = error
name = PropertiesConfig
filters = threshold
filter.threshold.type = ThresholdFilter
filter.threshold.level = trace
appenders = console
# delete till end of line