Skip to content

Instantly share code, notes, and snippets.

@Nimmidev
Nimmidev / copy_mode_with_line_numbers.sh
Last active December 20, 2025 01:45
tmux copy mode with line numbers
#!/bin/sh
declare -r LINE_NUMBER_PANE_WIDTH=3
declare -r LINE_NUMBER_UPDATE_DELAY=0.1
declare -r COLOR_NUMBERS_RGB="101;112;161"
declare -r COLOR_ACTIVE_NUMBER_RGB="255;158;100"
open_line_number_split(){
local self_path=$(realpath $0)
local pane_id=$(tmux display-message -pF "#{pane_id}")
@lnwncentral
lnwncentral / Officially Translated Light Novels
Last active December 20, 2025 01:40
Officially Translated Light Novels
Last update: 25/02/2025 20:47
!Completed: https://mega.nz/folder/sMcCXKpa#_R-M2Cqh9NYbFWWVWVAmxw
!EPUB: https://mega.nz/folder/5AE2DTKS#-u5vZ1LauFo4vRDiAvFQIw
!PDF: https://mega.nz/folder/ER1HXJZT#AnftN521aESOeisBWk_tMw
!Yaoi/37C: https://mega.nz/folder/8A0RyZIS#x4N8tGqddmDHMMbCy1L0qA
!Yaoi/A Kiss and a Pair of Handcuffs: https://mega.nz/folder/0V9zTQ6J#TnF--X0XuXuKr_lmIqTOxA
!Yaoi/Ai no Kusabi: https://mega.nz/folder/5FUhmLyA#p_iCdky89s6sTHJNAHXMDQ
!Yaoi/Ai Shika Iranee yo: https://mega.nz/folder/cR9FRADS#8Byg_qCw_mQ1VIGEFCc4KA
!Yaoi/All My Loving: https://mega.nz/folder/Ud80ATRK#BFzuo5vhxZx1uYtZlhwbVw
!Yaoi/Amazing Grace: https://mega.nz/folder/FcFW2bRC#vxpnv6Kq4MwPYOsUI1353g
@emisjerry
emisjerry / obsidian.ahk
Created July 4, 2020 11:31
AutoHotkey Scripts for obsidian.md
;; Scripts for obsidian.md
;; http://jdev.tw/blog
;; v0.1 2020/07/02 jerry
#SingleInstance Force
:O*:d0::
;; 0409 language code for USA
FormatTime, vToday,L0x0409, yyyy-MM-dd_ddd
send [[%vToday%]]
return
@sedm0784
sedm0784 / CapsLockCtrlEscape.ahk
Last active December 20, 2025 01:36
AutoHotkey script to map Caps Lock to Escape when it's pressed on its own and Ctrl when used in combination with another key, à la Steve Losh. Adapted from one that does something similar with the Ctrl Key on the Vim Tips Wiki (http://vim.wikia.com/wiki/Map_caps_lock_to_escape_in_Windows?oldid=32281). (Plus contribs from @randy909 & @mmikeww.)
g_LastCtrlKeyDownTime := 0
g_AbortSendEsc := false
g_ControlRepeatDetected := false
*CapsLock::
if (g_ControlRepeatDetected)
{
return
}
@EntranceJew
EntranceJew / Get-TweetVid.ps1
Created May 17, 2017 20:33
take a twitter m3u8 link and download it properly
# take a twitter m3u8 link and download it properly
function Get-TweetVid {
param( [string]$Uri, [string]$OutDir )
$out_file = (Split-Path $Uri -Leaf).Replace(".m3u8", ".mp4")
$out_path = Join-Path $OutDir $out_file
if( -Not (Test-Path $out_path) ){
mkdir -Path $out_path
}
ffmpeg -i $Uri -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $out_path
}
@IljaN
IljaN / yt-dlp-cheatsheet.md
Created May 24, 2024 21:46
yt-dlp cheatsheet

Video as mp3:

yt-dlp -x --audio-format mp3 --audio-quality 0  "https://www.youtube.com/watch?v=JH-ct2dlGuc"

Playlist as mp3s:

yt-dlp --ignore-errors --format bestaudio --extract-audio --audio-format mp3 --audio-quality 160K --output "%(title)s.%(ext)s" --yes-playlist 'https://www.youtube.com/playlist?list=PLwGVk6o5Yub6X0z5D5gx3UBgOqlXVRQfI'
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active December 20, 2025 01:13
Conventional Commits Cheatsheet
@DanWBR
DanWBR / dwsim_automation.py
Last active December 20, 2025 01:13
Create, run and save a new DWSIM simulation in Python
import pythoncom
pythoncom.CoInitialize()
import clr
from System.IO import Directory, Path, File
from System import String, Environment
dwsimpath = "C:\\Users\\Daniel\\AppData\\Local\\DWSIM8\\"
@DanWBR
DanWBR / dwsim_automation_sample2.py
Last active December 20, 2025 01:12
DWSIM Automation Sample in Python - Create a Flowsheet with a Distillation Column for Water/Acetone/Ethanol Separation (requires DWSIM v8.4.5 or newer)
# remove the following two lines to run on linux
import pythoncom
pythoncom.CoInitialize()
import clr
from System.IO import Directory, Path, File
from System import String, Environment
dwsimpath = "C:\\Users\\danie\\AppData\\Local\\DWSIM\\"
@jweinst1
jweinst1 / lztzsort.rs
Last active December 20, 2025 01:11
Automatic Sorting in Rust with bit RZ and LZ instructions
fn get_eq_or_gt(num:u64, target:u64) -> Option<u64> {
if target > 63 {
return None;
}
let shifted = num >> target;
if shifted == 0 {
return None;
}
return Some(shifted.trailing_zeros() as u64 + target);
}