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
| docker rmi --force $(docker images --all --quiet) |
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
| cpu: 8 | |
| disk: 200 | |
| memory: 8 | |
| arch: aarch64 | |
| runtime: docker | |
| hostname: "" | |
| kubernetes: | |
| enabled: false | |
| version: v1.34.1+k3s1 |
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
| { | |
| "editor": { | |
| "caret": "#3A87FE", | |
| "background": "#1F1F24", | |
| "pageGuide": { | |
| "background": "#1F1F24", | |
| "hairline": "#FFFFFF4D" | |
| }, | |
| "highlightedTextBackground": "#FFFF005A", | |
| "invisibleCharacters": "#424D5B", |
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
| echo Output defaults domains | |
| defaults domains > domains.txt | |
| echo Replace \', \' with new lines | |
| sed -i "" 's/, /\n/g' domains.txt | |
| echo Reset Liquid Glass defaults for apps | |
| while read d; do | |
| defaults delete "$d" com.apple.SwiftUI.IgnoreSolariumLinkedOnCheck | |
| done <domains.txt |
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 | |
| class AppDelegate: NSObject, NSApplicationDelegate { | |
| var window: NSWindow! | |
| func applicationDidFinishLaunching(_ aNotification: Notification) { | |
| window = NSWindow( | |
| contentRect: NSRect(x: 0, y: 0, width: 800, height: 600), | |
| styleMask: [.titled, .closable], |
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 os | |
| from concurrent.futures import ProcessPoolExecutor, Future | |
| from io import BytesIO | |
| from pandas import DataFrame, read_parquet | |
| # Requires installation of pyarrow as well | |
| def run_query_in_process(query: str) -> bytes: |
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
| # From https://stackoverflow.com/questions/107701/how-can-i-remove-ds-store-files-from-a-git-repository | |
| find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch | |
| touch .gitignore | |
| echo .DS_Store >> .gitignore | |
| git add .gitignore | |
| git commit --amend | |
| git push -u origin main |
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
| for dir in */; do cd "$dir" && git fetch && git pull && cd ..; 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
| # This script should be run with sudo | |
| useradd --disabled-password --create-home $1 | |
| passwd -dl $1 | |
| usermod -g sshers $1 # Use your own group if you have one, if not remove this line | |
| mkdir -p /home/$1 | |
| chown -R $1:$1 /home/$1 | |
| sudo -u $1 ssh-keygen -f /home/$1/.ssh/rd_rsa -q -N "" # Specify a passphrase if you need one | |
| mv /home/$1/.ssh/id_rsa.pub /home/$1/.ssh/authorized_keys |
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
| async def create_browser_context(p: Playwright) -> BrowserContext: | |
| browser_context: BrowserContext = await p.chromium.launch_persistent_context( | |
| user_data_dir=f"./browser_profiles/{str(uuid4())}", | |
| args=[ | |
| "--password-store=basic", | |
| "--disable-features=site-per-process", | |
| "--disable-blink-features=AutomationControlled", | |
| "--disable-web-security", | |
| "--disable-audio-output", | |
| "--disable-gpu", |
NewerOlder