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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>ANSIBlackColor</key> | |
| <data> | |
| YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMS | |
| AAGGoF8QD05TS2V5ZWRBcmNoaXZlctEICVRyb290gAGrCwwXGBkeHygwMThVJG51bGzV | |
| DQ4PEBESExQVFlYkY2xhc3NbTlNDb2xvck5hbWVcTlNDb2xvclNwYWNlXU5TQ2F0YWxv | |
| Z05hbWVXTlNDb2xvcoAKgAMQBoACgARWU3lzdGVtXxAndW5lbXBoYXNpemVkU2VsZWN0 |
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
| #!/bin/bash | |
| for f in *.mp3; do | |
| ffmpeg -i "$f" -map 0:a -codec:a copy -map_metadata -1 "${f%.*}-out.mp3" | |
| done |
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
| #!/bin/sh | |
| # Helps turn videos into gif loops | |
| # Usage: | |
| # ./gloop input.mp4 palette.png output.gif | |
| # Reference: | |
| # http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html | |
| # Shortcut |
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
| #!/bin/sh | |
| # Helps turn videos into gif strips | |
| # Usage: | |
| # ./gfilm input.mp4 output.gif | |
| # Reference: | |
| # https://imagemagick.org/script/montage.php | |
| # Shortcut |
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
| #!/bin/sh | |
| # Helps produce iconsets | |
| # Usage: | |
| # ./gicns input.png output.icns | |
| # Reference: | |
| # http://stackoverflow.com/questions/12306223/how-to-manually-create-icns-files-using-iconutil | |
| # Shortcut |
NewerOlder