Skip to content

Instantly share code, notes, and snippets.

View ursetto's full-sized avatar

Jim Ursetto ursetto

View GitHub Profile
@zenofile
zenofile / build.sh
Last active March 13, 2024 07:30
Building a static tmux binary with musl
#!/usr/bin/env bash
# vi: set ft=sh ts=4 sw=0 sts=-1 sr noet nosi tw=0 fdm=manual:
set -o errexit
declare -A version
version[musl]=1.2.4
version[libevent]=2.1.12
version[ncurses]=6.4
@rubo77
rubo77 / snap-update.sh
Last active March 31, 2023 16:46
start snap service, delete snap backups, do a refresh and disable it again
#!/bin/bash
# this script starts the snapd service, deletes old snap images, does a refresh and disables it again
# put it in /usr/local/sbin/snap-update and give it executable rights
# Note: If you run apt upgrade and there is an update to a package that is managed by snapd,
# the upgrade will hang if snapd is still masked, so remember to unmask snapd in that case
# and start apt upgrade again
set -x
systemctl unmask snapd.service
@tbutts
tbutts / tmux-migrate-options.py
Last active February 29, 2024 08:11
For tmux configs: Merge deprecated/removed -fg, -bg, and -attr options into the -style option
#!/usr/bin/env python
# vim: set fileencoding=utf-8
#
# USAGE:
# Back up your tmux old config, run the script and redirect stdout to your conf
# file. Example:
#
# $ cp ~/.tmux.conf ~/.tmux.conf.orig
# $ python ./tmux-migrate-options.py ~/.tmux.conf.orig > ~/.tmux.conf
#
@w0rd-driven
w0rd-driven / passwords.txt
Created November 18, 2016 20:19
BFG Repo-Cleaner --replace-text example
PASSWORD1 # Replace literal string 'PASSWORD1' with '***REMOVED***' (default)
PASSWORD2==>examplePass # replace with 'examplePass' instead
PASSWORD3==> # replace with the empty string
regex:password=\w+==>password= # Replace, using a regex
regex:\r(\n)==>$1 # Replace Windows newlines with Unix newlines
@masutaka
masutaka / init.el
Last active April 29, 2021 22:13
a timer setting for recentf-mode without notifications to minibuffer.
(require 'cl)
(defvar my-recentf-list-prev nil)
(defadvice recentf-save-list
(around no-message activate)
"If `recentf-list' and previous recentf-list are equal,
do nothing. And suppress the output from `message' and
`write-file' to minibuffer."
(unless (equal recentf-list my-recentf-list-prev)