Skip to content

Instantly share code, notes, and snippets.

View miblodelcarpio's full-sized avatar

Matt Mascarenhas miblodelcarpio

View GitHub Profile
@miblodelcarpio
miblodelcarpio / ranger_single
Created April 26, 2024 15:35
zsh script to run ranger in "single window" mode, opening only the tabs saved by "save_tabs_on_exit", and suppressing the "$PWD" if it wasn't one of them
#!/bin/zsh
RangerTabsFilePath="$XDG_DATA_HOME/ranger/tabs"
RangerTabCount=0
WouldOpenPWD=0
if [ -f $RangerTabsFilePath ]; then
# Split on newline from: https://unix.stackexchange.com/questions/29724/how-to-properly-collect-an-array-of-lines-in-zsh#29748
RangerTabs=("${(@f)$(tr -s '\n\0' '\0\n' < $RangerTabsFilePath)}")
RangerTabCount=${#RangerTabs[@]}
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
#
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
@miblodelcarpio
miblodelcarpio / jump_to_time.lua
Created November 4, 2017 18:03
Zilarrezko's ~/.config/mpv/scripts/jump_to_time mpv script
local Time = ""
local TakingInput = false
function InitiateKeybindings()
mp.add_forced_key_binding("0", "JumpTo_Key_0", AddToJumpTime0)
mp.add_forced_key_binding("1", "JumpTo_Key_1", AddToJumpTime1)
mp.add_forced_key_binding("2", "JumpTo_Key_2", AddToJumpTime2)
mp.add_forced_key_binding("3", "JumpTo_Key_3", AddToJumpTime3)
mp.add_forced_key_binding("4", "JumpTo_Key_4", AddToJumpTime4)
mp.add_forced_key_binding("5", "JumpTo_Key_5", AddToJumpTime5)
@miblodelcarpio
miblodelcarpio / notes_weechat
Last active February 24, 2023 18:04
WeeChat Relay Setup
weechat
Relay setup
On the server's instance of weechat:
/relay add ssl.irc 8001
/secure set relay WHATEVER_PASSWORD
/set relay.network.password "${sec.data.relay}"
On the server, to generate the ssl certificate: