Skip to content

Instantly share code, notes, and snippets.

View oasido's full-sized avatar
🚢
SHIP IT

Ofek Asido oasido

🚢
SHIP IT
View GitHub Profile
@oasido
oasido / Force KateX LTR
Created May 8, 2025 11:13
Force LTR on KaTeX (ChatGPT)
// ==UserScript==
// @name Force LTR on KaTeX (ChatGPT/OpenAI)
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Add dir="ltr" to all .katex-html elements on ChatGPT/OpenAI
// @match https://chat.openai.com/*
// @match https://chatgpt.com/*
// @match https://*.openai.com/*
// @grant none
// ==/UserScript==
@oasido
oasido / okular-session
Created November 9, 2024 11:42
okular save/restore session
#!/usr/bin/env bash
# Save and restore Okular sessions
set -e
dump() {
for fd in /proc/$(ps -C okular -o pid= | sed -e's/\s//g')/fd/*; do
readlink "$fd"
done | grep '.pdf'
}
# General settings
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",*256col*:Tc"
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
set -ga terminal-overrides ",xterm-256color:Tc"
set -ga terminal-overrides ",alacritty:RGB"
set -s escape-time 50
set -g base-index 1
set -g focus-events on
@oasido
oasido / audio_backup.bat
Created June 29, 2022 13:14
Batch file to export ALL audio settings to a .reg file
:: Directory to save backups
SET backupDir=D:\Backups\Audio Backup
:: Store date as a variable
FOR /f "tokens=2 delims==" %%G in ('wmic os get localdatetime /value') do set datetime=%%G
SET hh=%time:~0,2%
SET hh=%hh: =0%
SET datetime=%datetime:~0,4%-%datetime:~4,2%-%datetime:~6,2% %hh%-%time:~3,2%-%time:~6,2%
:: Create a backup of the current audio settings state