Skip to content

Instantly share code, notes, and snippets.

View timmytimj's full-sized avatar

timmytimj timmytimj

View GitHub Profile
@timmytimj
timmytimj / getmactags.sh
Created August 23, 2023 00:17
Get All Finder Tags Used in a Dir
#!/bin/bash
#DIRECTORY="<your_directory_here>"
DIRECTORY=$TARGDIR #export when calling
IFS=$'\n' # set internal field separator to handle filenames with spaces
tags=() # declare an array to hold the tags
# find command recursively finds all files (not directories) in the specified directory
for file in $(find "$DIRECTORY" -type f); do
# mdls command gets file metadata, grep filters out the lines containing kMDItemUserTags, sed cleans up the output
@timmytimj
timmytimj / tampermonkey.js
Created August 21, 2023 10:33
e621i userscript 20230821
// ==UserScript==
// @name re621 - e621 Reimagined
// @namespace re621.bitwolfy.com
// @version 1.5.60
// @description Subscription manager, mass downloader, thumbnail enhancer, and more for e621
// @author bitWolfy
// @license GPL-3.0-only
// @supportURL https://github.com/re621/re621.Legacy/issues
// @homepageURL https://e621.net/forum_topics/25872
// @contributionURL https://ko-fi.com/bitwolfy
@timmytimj
timmytimj / friends_urls.txt
Created August 18, 2023 04:28
chatgpt openai secret "friends" pulled from some random javascript
https://go.julrdr.com
https://k2s.cc/pr
http://partners.adklick.de/tracking.php
http://clicks.toteme.com
http://adserver.sejt.com
https://go.xlviiirdr.com
http://wct.link
https://loboclick.com
https://www.shareasale.com/u.cfm
https://prf.hn/click/"][href*="/adref
@timmytimj
timmytimj / random_env_vars.md
Created August 17, 2023 21:15
MacOS Kern maxvalues

Orig:

kern.maxproc: 16000
kern.maxfiles: 524288
kern.maxfilesperproc: 64000

``sh

set max on Darwin newputer.local 22.5.0 Darwin Kernel Version 22.5.0

sudo sysctl -w kern.maxproc=16000

{
"title": "Remap Apple Consumer Keys with fn",
"rules": [
{
"description": "Decrease Display Brightness",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "f1",
@timmytimj
timmytimj / gist:9913e3ab0af8008aad688d327a0c9d59
Created May 30, 2021 01:49
LSHIFT + RSHIFT becomes Capslock [karabiner elements] import json
https://genesy.github.io/karabiner-complex-rules-generator/#eyJ0aXRsZSI6IkNBUFNfTE9DSyB0byBIeXBlci9Fc2NhcGUgKFNISUZUK0NPTU1BTkQrT1BUSU9OK0NPTlRST0wpICYgSHlwZXIgKyBWSU0gTmF2aWdhdGlvbiBrZXlzIiwicnVsZXMiOlt7ImRlc2NyaXB0aW9uIjoiVG9nZ2xlIENBUFNfTE9DSyB3aXRoIExFRlRfU0hJRlQgKyBSSUdIVF9TSElGVCIsIm1hbmlwdWxhdG9ycyI6W3siZnJvbSI6eyJrZXlfY29kZSI6ImxlZnRfc2hpZnQiLCJtb2RpZmllcnMiOnsibWFuZGF0b3J5IjpbInJpZ2h0X3NoaWZ0Il0sIm9wdGlvbmFsIjpbImNhcHNfbG9jayJdfX0sInRvIjpbeyJrZXlfY29kZSI6ImNhcHNfbG9jayJ9XSwidG9faWZfYWxvbmUiOlt7ImtleV9jb2RlIjoibGVmdF9zaGlmdCJ9XSwidHlwZSI6ImJhc2ljIn0seyJmcm9tIjp7ImtleV9jb2RlIjoicmlnaHRfc2hpZnQiLCJtb2RpZmllcnMiOnsibWFuZGF0b3J5IjpbImxlZnRfc2hpZnQiXSwib3B0aW9uYWwiOlsiY2Fwc19sb2NrIl19fSwidG8iOlt7ImtleV9jb2RlIjoiY2Fwc19sb2NrIn1dLCJ0b19pZl9hbG9uZSI6W3sia2V5X2NvZGUiOiJyaWdodF9zaGlmdCJ9XSwidHlwZSI6ImJhc2ljIn1dfV19
async function handleRequest(request) {
return Response.redirect(someURLToRedirectTo, code)
}
addEventListener('fetch', async event => {
event.respondWith(handleRequest(event.request))
})
/**
* Example Input
* @param {Request} url where to redirect the response
* @param {number?=301|302} type permanent or temporary redirect

Keybase proof

I hereby claim:

  • I am timmytimj on github.
  • I am timmytimj (https://keybase.io/timmytimj) on keybase.
  • I have a public key ASBgdpcT_Qsrs8ou2HT2i8jFpw0X8N5oRA8dzfz7pYKJhgo

To claim this, I am signing this object: