Skip to content

Instantly share code, notes, and snippets.

View b0o's full-sized avatar
👻

Maddison Hellstrom b0o

👻
View GitHub Profile
bind-key C-b send-prefix
bind-key C-o rotate-window
bind-key C-z suspend-client
bind-key Space next-layout
bind-key ! break-pane
bind-key " split-window
bind-key # list-buffers
bind-key $ command-prompt -I #S "rename-session '%%'"
bind-key % split-window -h
bind-key & confirm-before -p "kill-window #W? (y/n)" kill-window
@miguelmota
miguelmota / README.md
Last active March 16, 2024 12:52
Multiple accounts with Mutt E-Mail Client (gmail example)

How to set up multiple accounts with Mutt E-mail Client

Thanks to this article by Christoph Berg

Instructions

Directories and files

~/
@zer4tul
zer4tul / weechat.md
Last active August 21, 2021 21:12
A Simple, Base16 Friendly, Weechat Setup

A Simple, Base16 Friendly, Weechat Setup

Scripts

  • Some must-have scripts
  /script install buffers.pl buffer_autoclose.py iset.pl go.py colorize_nicks.py
@roge
roge / dns.md
Last active August 6, 2023 07:32
Public DNS Servers

DNS.md

A list of reasonably reliable DNS servers that I've personally tested to ensure that they fully support DNSSEC and do not hijack NXDOMAIN responses.

IPv4

Address Organization Location Service
8.8.8.8 Google Worldwide (Anycast) Google Public DNS
8.8.4.4 Google Worldwide (Anycast) Google Public DNS
package main
import (
"net/http"
"database/sql"
"fmt"
"log"
"os"
)
@hlissner
hlissner / replace.sh
Last active September 11, 2023 10:14
Bulk search & replace with ag (the_silver_searcher)
# ag <https://github.com/ggreer/the_silver_searcher>
# usage: ag-replace.sh [search] [replace]
# caveats: will choke if either arguments contain a forward slash
# notes: will back up changed files to *.bak files
ag -0 -l $1 | xargs -0 perl -pi.bak -e "s/$1/$2/g"
# or if you prefer sed's regex syntax:
ag -0 -l $1 | xargs -0 sed -ri.bak -e "s/$1/$2/g"
@subfuzion
subfuzion / global-gitignore.md
Last active April 23, 2024 22:47
Global gitignore

There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.

All other files should be in your own global gitignore file:

  • Create a file called .gitignore in your home directory and add any filepath patterns you want to ignore.
  • Tell git where your global gitignore file is.

Note: The specific name and path you choose aren't important as long as you configure git to find it, as shown below. You could substitute .config/git/ignore for .gitignore in your home directory, if you prefer.

@bailsman
bailsman / gist:0be72ceba495f4e3fab6
Created March 2, 2015 21:26
SSH_ASKPASS script that works without X
#!/bin/bash
set -o errexit
set -o nounset
# This script is useful when forwarding your agent to an untrusted server. It works without X.
#
# To use this script, export DISPLAY=FAKE SSH_ASKPASS=/path/to/this/script SSH_ASKPASS_TTY=$(tty)
# before you do eval `ssh-agent` (these variables should end up in the environment ssh-agent runs in)
# Then add keys to the agent with ssh-add -c /path/to/key
# ssh-agent will then call this script to ask you for confirmation when asked for that key.
@jsjolund
jsjolund / xmonad.hs
Last active October 17, 2023 22:57
Example of using xmonad inside xfce
-------------------------------------------------------------------------------
-- Configuration for using Xmonad inside Xfce, KDE and standalone.
--
-- Xfce: It is recommended to disable/remove xfwm4 and xfdesktop.
-- KDE: Plasma works with xmonad, except
-- 1. Mouse cursor cannot focus on empty monitors.
-- 2. Panel start-menu search field cannot receive input.
-------------------------------------------------------------------------------
@Changaco
Changaco / btrfs-undelete
Last active April 22, 2024 20:06
btrfs-undelete
#!/bin/bash
# btrfs-undelete
# Copyright (C) 2013 Jörg Walter <info@syntax-k.de>
# This program is free software; you can redistribute it and/or modify it under
# the term of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or any later version.
if [ ! -b "$1" -o -z "$2" -o -z "$3" ]; then
echo "Usage: $0 <dev> <file/dir> <dest>" 1>&2
echo