Skip to content

Instantly share code, notes, and snippets.

View jwhett's full-sized avatar
:shipit:
Enhance

Joshua Whetton jwhett

:shipit:
Enhance
View GitHub Profile
@jwhett
jwhett / sha1_dgst_main.go
Last active October 17, 2022 01:24 — forked from viktorbenei/main.go
sha1 hmac hexdigest signature
package main
import (
"crypto/hmac"
"crypto/sha1"
"crypto/subtle"
"encoding/hex"
"fmt"
"os"
)
@jwhett
jwhett / starship.toml
Created August 26, 2022 12:48
Starship config
add_newline = true
[character]
success_symbol = "[➜](bold green)"
[package]
disabled = true
[directory]
truncation_length = 3
@jwhett
jwhett / alacritty.yml
Created August 26, 2022 12:47
Alacritty config - github.com/alacritty/alacritty
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Import additional configuration files
#
# Imports are loaded in order, skipping all missing files, with the importing
# file being loaded last. If a field is already present in a previous import, it
# will be replaced.
#
# All imports must either be absolute paths starting with `/`, or paths relative
# to the user's home directory starting with `~/`.
@jwhett
jwhett / gh-filter-issue.fish
Last active August 22, 2022 12:31
Interactive fish function for working with GH Issues
function gh-filter-issue --description "Filter GH Issues"
# Mutually exclusive flags:
# - label, interactive: you cannot bot specify a
# label and interactively filter on label.
argparse --name gh-filter-issue --exclusive l,i h/help r/repo= l/label= c/cmd= i/interactive s/state= -- $argv
or return # this is needed if argparse fails and we want to halt.
for req in gh fzf gum jq
if ! command -q $req
echo "$req is required to run this function."
@jwhett
jwhett / get-go.fish
Last active December 14, 2021 23:53
updating go from the terminal
#!/usr/bin/fish
set -l deps fzf rg curl sort tar
set -l destination ~/.local
set -l go_loc $destination/go
set -l version_home https://go.dev/dl/
set -l dl_base https://dl.google.com/go
set -l ERR_MISSING_DEP 1
set -l ERR_INSTALL 2
@jwhett
jwhett / calculation.py
Last active November 16, 2020 20:09
Python CSV demonstration
import csv
import math
def diameter(rad):
return rad*2
def surface(rad):
return 4*math.pi*pow(rad,2)
@jwhett
jwhett / melvor-qol.js
Last active October 7, 2020 16:18
Melvor QOL Combined
// ==UserScript==
// @name MelvorQOL
// @namespace jwhett
// @version 1.1
// @description MelvorIdle QOL improvements
// @author Josh Whetton
// @match https://*.melvoridle.com/*
// @grant none
// ==/UserScript==
@jwhett
jwhett / kbd_settings.txt
Created October 2, 2020 13:19
Kinesis Gaming Configs
startup_file=layout1.txt
macro_speed=5
game_mode=OFF
status_play_speed=3
program_key_lock=OFF
v_drive=manual
led_mode=1
@jwhett
jwhett / swayrc
Last active May 19, 2020 14:21
Sway config
# Read `man 5 sway` for a complete reference.
# Also check this out: https://fedoramagazine.org/setting-up-the-sway-window-manager-on-fedora/
#############
# Variables #
#############
# Logo key. Use Mod1 for Alt.
set $mod Mod4
@jwhett
jwhett / sway-config
Last active August 26, 2022 12:46
Sway Debugging Logs
# Read `man 5 sway` for a complete reference.
# Also check this out: https://fedoramagazine.org/setting-up-the-sway-window-manager-on-fedora/
#############
# Variables #
#############
# Logo key. Use Mod1 for Alt.
set $mod Mod4