Skip to content

Instantly share code, notes, and snippets.

View Nate-Wilkins's full-sized avatar
🐧

Nate-Wilkins Nate-Wilkins

🐧
View GitHub Profile
@Nate-Wilkins
Nate-Wilkins / keybase.md
Created April 3, 2024 13:43
keybase.md

Keybase proof

I hereby claim:

  • I am nate-wilkins on github.
  • I am natewilkins (https://keybase.io/natewilkins) on keybase.
  • I have a public key whose fingerprint is F0EC 3EA2 7822 3282 B26C A4C1 AAA3 4B2F C4B6 60C6

To claim this, I am signing this object:

gcw() {
# Filter specific workflows.
local ADD_STATUS=$(git diff --staged --diff-filter=A --name-only)
local DELETE_STATUS=$(git diff --staged --diff-filter=D --name-only)
local RENAME_STATUS=$(git diff --staged --diff-filter=R --name-only)
# Update status includes everything else.
local UPDATE_STATUS=$(git diff --staged --diff-filter=MCTUXB --name-only)
# Make sure we're using one workflow by counting up workflow changes.
local STATUS_CHANGE_COUNT=0
@Nate-Wilkins
Nate-Wilkins / fibonacci.rs
Created February 1, 2024 20:50
fibonacci.rs
fn main() {
println!("{}", fibonacci(0));
println!("{}", fibonacci(1));
println!("{}", fibonacci(2));
println!("{}", fibonacci(30));
}
fn fibonacci(n: u64) -> u64 {
match n {
0 => 1,
@Nate-Wilkins
Nate-Wilkins / WinOS_CapsLock_VI.ahk
Last active October 18, 2023 03:11
WinOS_CapsLock_VI.ahk
CapsLock::Return
Capslock & h::Send {Left}
Capslock & j::Send {Down}
Capslock & k::Send {Up}
Capslock & l::Send {Right}
@Nate-Wilkins
Nate-Wilkins / spotify_ad_muter.userscript
Last active October 15, 2023 03:11
spotify_ad_muter.userscript
// ==UserScript==
// @name CodeNull - Spotify Ad Muter
// @author [email protected]
// @version 4.0
// @namespace http://tampermonkey.net/
// @description Detects and blocks ads on Spotify. Automatically mute Spotify ads. Turn sound on again after the ad.
// @match https://*.spotify.com/*
// @grant none
// @run-at document-start
// @icon https://www.google.com/s2/favicons?sz=64&domain=spotify.com
@Nate-Wilkins
Nate-Wilkins / youtube_ad_muter.userscript
Last active October 15, 2023 03:12
youtube_ad_muter.userscript
// ==UserScript==
// @name CodeNull - YouTube Videos Ad Muter
// @author [email protected]
// @version 4.0
// @namespace http://tampermonkey.net/
// @description Detects and blocks ads on YouTube Videos. Automatically mute ads. Turn sound on again after the ad.
// @match https://www.youtube.com/*
// @grant none
// @run-at document-start
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com
/*
* Create an animation frame with a specified callback with
* a target frame rate.
*/
const createAnimationFrame = (
callback,
targetFrameRate,
timePrevious,
timeCurrent,
) => {
@Nate-Wilkins
Nate-Wilkins / createAnimationFrame.ts
Last active October 12, 2023 01:20
createAnimationFrame.ts
/*
* Create an animation frame with a specified callback with
* a target frame rate.
*/
const createAnimationFrame = (
callback: (timeDelta: number) => boolean,
targetFrameRate?: number,
timePrevious?: number,
timeCurrent?: number,
): null | number => {
@Nate-Wilkins
Nate-Wilkins / amazon_prime_ad_muter.userscript
Last active February 22, 2024 00:07
amazon_prime_muter.userscript
// ==UserScript==
// @name CodeNull - Amazone Prime Video Ad Muter
// @author [email protected]
// @version 4.0
// @namespace http://tampermonkey.net/
// @description Detects and blocks ads on Amazon Prime Video. Automatically mute ads. Turn sound on again after the ad.
// @match https://www.amazon.com/gp/video/*
// @grant none
// @run-at document-start
// @icon https://www.google.com/s2/favicons?sz=64&domain=amazon.com
@Nate-Wilkins
Nate-Wilkins / flowjs-boolean-filter.js
Created October 25, 2018 20:24
FlowJS hackery to filter down arrays to specific types.
type A = {
a: number
};
const myA: A = { a: 1 };
const ac = [undefined, myA];
const ba: $ReadOnlyArray<A> = ac.filter(Boolean);