create a zsh prompt command containing the following items in order.
The color of each item is listed before the item in parens.
(blue) user name
(purple) host name
(yellow) current working directory
(black) active git branch
(green) checkmark if my git repository is clean
(red) XXX if my git repository is dirty
(red) current Ruby version number
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
| # Finds list of uids and gids without names and looks for files owned by those uids or gids | |
| find-orphan-files() { | |
| local -a orphan_uids orphan_gids predicates | |
| local uid gid | |
| sudo -v || return 1 | |
| orphan_uids=( | |
| "${(@f)$(sudo find / -xdev -nouser -printf '%U\n' 2>/dev/null | sort -n -u)}" | |
| ) |
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
| require "date" | |
| require "yaml" | |
| # Picks words from a weighted list, where weight decays sharply right after | |
| # a word is used and then recovers gradually over subsequent days. Words | |
| # used more times recover more slowly. | |
| class WeightedWordPicker | |
| DEFAULT_CONFIG_PATH = "config/weighted_word_picker.yml" | |
| # Fallback values, used for any key missing from the config source. |
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
| @ErictheCerise I do! | |
| TL;DR Logging is always technically possible, but some companies really don't keep them as a matter of policy. | |
| If you don't care about region-shifting for video streaming, I'd recommend Mullvad. | |
| If you don't care about speed or price, Perfect Privacy is good. | |
| NordVPN, Surfshark (these two are related companies) and Windscribe would all be in my shortlist if I wanted to be able to watch streaming services while connected. | |
| Now: a lot more detail |
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
| private static char[][] make_forward(){ | |
| char[][] pixel = new char[4][13]; | |
| pixel[0][0]=' '; | |
| pixel[0][1]=' '; | |
| pixel[0][2]=' '; | |
| pixel[0][3]='_'; | |
| pixel[0][4]='_'; | |
| pixel[0][5]='_'; | |
| pixel[0][6]='_'; | |
| pixel[0][7]='_'; |
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
| SELECT distinct ?item ?itemLabel ?itemDescription # (SAMPLE(?birth) as ?birth_date) | |
| WHERE{ | |
| ?item ?label "Shannen Doherty"@en. | |
| ?item wdt:P31 wd:Q5. | |
| # ?id wdt:P569 ?birth . | |
| ?article schema:about ?item . | |
| ?article schema:inLanguage "en" . | |
| SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } | |
| } |
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
| SELECT DISTINCT | |
| ?id | |
| ?idLabel | |
| (SAMPLE(?birth) as ?birth_date) | |
| (SAMPLE(?death_date) as ?dateOfDeath) | |
| (SAMPLE(?manner_of_death) as ?mannerOfDeath) | |
| (SAMPLE(?cause_of_death) as ?causeOfDeath) | |
| WHERE { | |
| ?id wdt:P31 wd:Q5. |
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
| #!/opt/homebrew/bin/python3 | |
| import sys | |
| def ordinalize(n): | |
| if n % 100 in (11, 12, 13): | |
| return f"{n}th" | |
| else: | |
| match n % 10: | |
| case 1: |
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
| tell application "Photos" | |
| activate | |
| set thePhotosFiles to {} | |
| set imageSel to (get selection) -- get the selected image | |
| repeat with im in imageSel | |
| set thePhotosFiles to the ({filename of im} & thePhotosFiles) | |
| end repeat |
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
| tell application "PDFpenPro" | |
| open theFile as alias | |
| -- Does the document need to be OCR'd? | |
| get the needs ocr of document 1 | |
| if result is true then | |
| tell document 1 | |
| ocr |
NewerOlder