Skip to content

Instantly share code, notes, and snippets.

Avatar

pythoninthegrass

View GitHub Profile
@pythoninthegrass
pythoninthegrass / openssl_commands.md
Created Jan 20, 2023 — forked from Hakky54/openssl_commands.md
Some list of openssl commands for check and verify your keys
View openssl_commands.md

OpenSSL 🔐

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
View bashprofile.py
#!/usr/bin/env python
import argparse
import io
import operator
import re
from contextlib import redirect_stderr
from pathlib import Path
"""
@pythoninthegrass
pythoninthegrass / backup-saves.service
Last active Dec 24, 2022
Backup local Steam Deck save files via ludusavi and rclone
View backup-saves.service
# /usr/lib/systemd/system/backup-saves.service
[Unit]
Description=Run ludusavi then rsync to offsite backup
[Service]
Type=simple
ExecStart=bash /home/deck/backup_saves.sh
@pythoninthegrass
pythoninthegrass / convert.py
Last active Nov 6, 2022 — forked from aolle/convert.py
Convert Nimbus Notes HTML to Markdown for UpNote
View convert.py
#!/usr/bin/env python3
"""
NOTE:
Extended into a full repo at https://github.com/pythoninthegrass/convert_html_md
Any future work will be posted there.
SOURCES:
https://gist.github.com/aolle/6e595650391deef79ffb1c9bb38fb6e9
https://dev.to/kcdchennai/python-decorator-to-measure-execution-time-54hk
@pythoninthegrass
pythoninthegrass / osascript_close_windows.sh
Last active Nov 1, 2022 — forked from Koze/CloseAllWindows.scpt
Close all windows with AppleScript
View osascript_close_windows.sh
#!/usr/bin/env bash
# SOURCE: https://gist.github.com/Koze/2e1a9bf967b2bf865fc9
# close all windows (e.g., thousands of finder windows from unarchiver)
osascript -e 'tell application "Finder" to close windows'
## index 1 is frontmost window
# osascript 'tell application "Finder" to close window 1'
@pythoninthegrass
pythoninthegrass / config.lua
Last active Oct 23, 2022
Lunar Vim (lvim) config
View config.lua
--[[
lvim is the global options object
Linters should be
filled in as strings with either
a global executable or a path to
an executable
]]
-- THESE ARE EXAMPLE CONFIGS FEEL FREE TO CHANGE TO WHATEVER YOU WANT
@pythoninthegrass
pythoninthegrass / quickemu_3.16-beta
Created Aug 1, 2022
Patched quickemu from @trollkarlen's macOS fork
View quickemu_3.16-beta
#!/usr/bin/env bash
export LC_ALL=C
if ((BASH_VERSINFO[0] < 4)); then
echo "Sorry, you need bash 4.0 or newer to run this script."
exit 1
fi
# Check for gnu tools on MacOS
UNAME="uname"
@pythoninthegrass
pythoninthegrass / README.md
Last active Jan 31, 2023
sysctl.conf stand-in on macOS 10.15+
View README.md

com.startup.sysctl.plist

As of at least macOS Catalina 10.15.3, /etc/sysctl.conf values are no longer respected and/or the file straight up doesn't exist (confirmed on macOS Monterey 12.4.)

Ran across a fio shm error: failed to setup shm segment while benchmarking SSDs. The fix was to set shmmni to 4096. The following has to happen:

  • Disable SIP
    • Disclaimer from Apple

      Warning

      Disable SIP only temporarily to perform necessary tasks, and reenable it as soon as possible. Failure to reenable SIP when you are done testing leaves your computer vulnerable to malicious code.

@pythoninthegrass
pythoninthegrass / .bashrc
Created Jun 23, 2022
Synology shell config
View .bashrc
#/etc/profile: system-wide .profile file for ash.
umask 077
PATH=/opt/bin:/opt/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin
export PATH
PGDATA=/var/services/pgsql
export PGDATA