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
| Automatically read your Square Enix OTP from 1Password using XIVLauncher | |
| 1. Install and setup XIVLauncher | |
| Note: Flatpak version doesn't seem to work here | |
| 2. Enable the "Enable XL Authenticator app/OTP macro support" option in XIVLauncher settings | |
| 3. Install and configure the 1Password CLI. Make sure it's working. | |
| 4. Create a new script: create the attached shell file as `~/.local/bin/xivlauncherotpd.sh` | |
| 5. Create a new systemd unit: create the attached service file as `~/.config/systemd/user/xiv-launcher-otp.service` | |
| 6. Run `systemctl enable --user xiv-launcher-otp` to enable the service |
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
| #!/usr/bin/env python3 | |
| import os | |
| import re | |
| import subprocess as sp | |
| base_path = os.path.expanduser("~/Applications") | |
| app_name = "Ghidra" | |
| exec_file = "ghidraRun" |
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 requests | |
| import json | |
| import pathlib | |
| """ | |
| This script is designed to import your Google Photos albums into Immich. | |
| It expects: | |
| - A directory containing all your Google Photos albums, exported from Google Takeout. Each album should be a directory, and each photo should be a file inside that directory. | |
| - Your photos should ALREADY be uploaded to Immich. This script will not upload them for you, it will only try to find them in your library to add them to existing or new albums. |
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
| /** | |
| * Converts an ISO 3166-1 alpha-2 country code to the corresponding Unicode flag emoji. | |
| * | |
| * ``` | |
| * "FR".countryCodeToUnicodeFlag() // 🇫🇷 | |
| * "US".countryCodeToUnicodeFlag() // 🇺🇸 | |
| * ``` | |
| */ | |
| fun String.countryCodeToUnicodeFlag(): String { | |
| return this |
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
| # sort in date/month directories | |
| exiftool -r "-Directory<DateTimeOriginal" -d "%Y/%m" -v . | |
| # use CreationDate if DateTimeOriginal didn't work | |
| exiftool "-Directory<CreationDate" -d "%Y/%m" -v . |
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
| 1. No private data leave the app, including the camera feed. | |
| 2. Actually, no data even leaves the app. It doesn't even require Internet permissions. It only ever interfaces with Torque. |
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
| #!/usr/bin/env python | |
| # | |
| # Copyright 2007-2013 The Python-Twitter Developers | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # |
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 Foundation | |
| public typealias JSON = AnyObject | |
| public func JSONWithData(data: NSData) throws -> JSON? { | |
| return NSJSONSerialization.JSONObjectWithData(data, options: []) | |
| } |
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 | |
| if [ $# -eq 0 ]; then | |
| echo "Usage: $0 <message> [title]" | |
| exit | |
| fi | |
| MESSAGE=$1 | |
| TITLE=$2 |
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
| ### colors | |
| RED="\e[0;31m" | |
| GREEN="\e[0;32m" | |
| CLR="\e[0m" | |
| echo "" | |
| ### check internet connectivity | |
| INTERNET_WGET=`wget -q --tries=10 --timeout=20 -O - http://google.com > /dev/null` | |
| INTERNET_STATUS="${RED}DOWN$CLR" |
NewerOlder