This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Got most of these from: exiftool.org/TagNames/EXIF.html | |
| const EXIF = 0x45786966 | |
| const LITTLE_ENDIAN = 0x4949 | |
| const JPEG = 0xFFD8 | |
| // The IFD0 tag holding the GPS Image File Directory (IFD) offset. | |
| const GPS_POINTER = 0x8825 | |
| // The JPEG segment marker where EXIF data is found. | |
| const APP1 = 0xFFE1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| plutil -convert xml1 -o - ~/Library/Safari/Bookmarks.plist | xmllint --xpath '//key[.="URLString"]/following-sibling::string[1]/text()' - | tr ' ' '\n' | sort | uniq -d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Cocoa | |
| @main | |
| class AppDelegate: NSObject, NSApplicationDelegate { | |
| var eventTap: CFMachPort? | |
| func applicationDidFinishLaunching(_ aNotification: Notification) { | |
| let eventMask = (1 << CGEventType.keyDown.rawValue) | (1 << CGEventType.keyUp.rawValue) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://gist.githubusercontent.com/thewhodidthis/4f5bf2f37f4870b9235642b48827c893/raw/proxy.pac | |
| function FindProxyForURL(url, host) { | |
| if (shExpMatch(host, "*.pi4")) { | |
| return "PROXY 192.168.1.227" | |
| } | |
| return "DIRECT" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # The filenaming timestamp | |
| D?=$$(date +"%Y%m%d%s") | |
| # Step | |
| S?=2 | |
| # Pixmap dimensions | |
| W?=192 | |
| H?=192 | |
| # How many pixels minus one | |
| Q?=$$(($W * $H - 1)) | |
| # How many steps minus one |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| YEAR?=$$(date +%Y) | |
| UUID?=$$(python -c "import uuid; print(uuid.uuid4())") | |
| ITEM?=justmoreidlechatternot | |
| BOOM?=$(notdir $(CURDIR)) | |
| SHOW?=WA | |
| NAME?=$$(date +%Y%m%d%s) | |
| run: get cut mp3 put | |
| @rm -rf episode.mp3 *.wav | |
| put: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # The filenaming timestamp | |
| D?=$$(date +"%Y%m%d%s") | |
| # How many feature points? | |
| R?=10 | |
| # Pixmap dimensions | |
| W?=80 | |
| H?=45 | |
| # How many pixels? | |
| S?=$$(($W * $H - 1)) | |
| # Out image dimensions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # The filenaming timestamp | |
| D?=$$(date +"%Y%m%d%s") | |
| # Pix or bitmap dimensions | |
| W?=80 | |
| H?=45 | |
| # How many numbers total? | |
| S?=$$(bc <<< "3 * $W * $H") | |
| # How many samples? | |
| G?=$$(bc <<< "3 * $H") | |
| # Out image dimensions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| build: | |
| @mkdir $$(date +"%Y%m%d%s"); cd $$_; echo "$$(date +"%Y%m%d%s")" > index.html; zip ../"$$(date +"%Y%m%d%s")".zip -r . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export function crc32c(data, n = data.length, poly = 0xEDB88320) { | |
| let crc = 0xFFFFFFFF | |
| for (let i = 0; i < n; i += 1) { | |
| crc = crc ^ data.charCodeAt(i) | |
| for (let j = 0; j < 8; j += 1) { | |
| crc = crc & 1 ? (crc >>> 1) ^ poly : crc >>> 1 | |
| } | |
| } |
NewerOlder