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 October 23, 2024 18:58
Building a static tmux binary with musl
#!/usr/bin/env bash
set -o errexit
MUSL_VERSION=1.2.5
LIBEVENT_VERSION=2.1.12
NCURSES_VERSION=6.5
TMUX_VERSION=3.5a
TARGETDIR=$1
@rubo77
rubo77 / snap-update.sh
Last active September 20, 2024 17:14
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)