Almost everything here is installable via
homebrew
- Json Parser:
jq - GitHub CLI:
gh - Google zx:
zx - Compression:
zip,unzip,tar
| /* Downloader for SubsPlease. Convert to bookmarklet using https://mrcoles.com/bookmarklet/ */ | |
| /* Note: Use with Firefox coz Chrome restricts external protocol execution without user interaction so only 1 link gets clicked / pages open */ | |
| /* Based on https://github.com/the-codinator/anime-downloader-bookmarklet */ | |
| if (!window.location.href.startsWith('https://subsplease.org/shows/')) throw Error('Not on SubsPlease'); | |
| console.log('Executing Anime Downloader for SubsPlease!'); | |
| if (typeof codiLinkType == 'undefined') codiLinkType = 'Magnet'; | |
| if (typeof codiVideoQuality == 'undefined') codiVideoQuality = '1080p'; |
Almost everything here is installable via
homebrew
jqghzxzip, unzip, tar| /** | |
| * TST v3.8.19 | |
| * | |
| * Components: https://github.com/piroor/treestyletab/tree/trunk/webextensions/sidebar/components | |
| * Base CSS: https://github.com/piroor/treestyletab/blob/trunk/webextensions/sidebar/styles/base.css | |
| */ | |
| /* Note: select "No Decoration" under themes to apply these */ | |
| /* Root variables */ |
| /* Script to create a serive SAS URI for an Azure Blob Storage Container */ | |
| const { generateBlobSASQueryParameters, SASProtocol, StorageSharedKeyCredential } = require('@azure/storage-blob'); // v12.x | |
| function generageBlobSasSignatureValues(blobContainerName, storedPolicyName, overrides) { | |
| const startsOn = new Date(); | |
| const expiresOn = new Date(startsOn.getTime() + 86400_000); // 1 day - customizable | |
| const permissions = storedPolicyName ? undefined : 'racwl'; // All but delete, Max permissions are 'racwdl' | |
| // Stored Access Policy (for the container) defines the permissions and optionally startsOn & expiresOn | |
| // Using an Access Policy allows us to invalidate SAS by deleting the policy |
| ################### | |
| ##### SOURCES ##### | |
| ################### | |
| ##### Aliases ##### | |
| ## Git | |
| export GH_HOST=github.com | |
| function clone { [[ -z "$1" ]] && echo "Error: Missing repo name parameter" && return 2; local git_org=$(basename $(pwd)); echo "Cloning [$git_org/$1] ..."; git clone "git@$GH_HOST:$git_org/$1.git"; } |
| #!/bin/bash | |
| # Script to auto commit all changes in a specific repository | |
| # Run this with a scheduler like launchd or systemd | |
| REMOTE=origin | |
| BRANCH=master | |
| DIR="$1" | |
| [[ -z "$DIR" ]] && DIR="." |
| <!-- Data backup launchd agent for work directory --> | |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" | |
| "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Label</key> | |
| <string>org.codi.backup.work</string> | |
| <key>WorkingDirectory</key> |
| import { createNamespace } from 'cls-hooked'; | |
| // https://www.npmjs.com/package/cls-hooked | |
| interface MyContext { | |
| // ... | |
| } | |
| const ns = createNamespace('abc'); | |
| const key = 'context'; |