Skip to content

Instantly share code, notes, and snippets.

View iacchus's full-sized avatar

Iacchus Mercurius iacchus

View GitHub Profile
@iacchus
iacchus / zbell.sh
Created November 24, 2023 10:49 — forked from jpouellet/zbell.sh
Makes Zsh print a bell when long-running commands finish. I use this in combination with i3 and throw big compile jobs (or whatever it may be) into another workspace to get a nice visual notification (workspace indicator turns red) when it's done so I don't need to waste time regularly checking on it.
#!/usr/bin/env zsh
# This script prints a bell character when a command finishes
# if it has been running for longer than $zbell_duration seconds.
# If there are programs that you know run long that you don't
# want to bell after, then add them to $zbell_ignore.
#
# This script uses only zsh builtins so its fast, there's no needless
# forking, and its only dependency is zsh and its standard modules
#
@iacchus
iacchus / install-arch.md
Created October 15, 2021 04:28 — forked from mjnaderi/install-arch.md
Install Arch Linux with Full Disk Encryption (LVM on LUKS)
@iacchus
iacchus / tmux.conf
Created July 1, 2021 01:34 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@iacchus
iacchus / myweechat.md
Created May 12, 2021 21:27 — forked from pascalpoitras/config.md
My always up-to-date WeeChat configuration (weechat-dev)

WeeChat Screenshot

You need at least WeeChat 3.2-dev

Enable mouse

/mouse enable

@iacchus
iacchus / gist:25cf9c61fd70e0153f78303b713f9b1b
Created May 12, 2021 21:05 — forked from hencjo/gist:0710d51c5ba51e0aeb2d905f1e3a38f3
Xorg: Two keyboards with different keyboard layout.
# Use xinput to find your keyboards.
$ xinput
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=11 [slave pointer (2)]
⎜ ↳ TPPS/2 IBM TrackPoint id=12 [slave pointer (2)]
⎜ ↳ Logitech Performance MX id=14 [slave pointer (2)]
⎜ ↳ E-Signal USB Gaming Keyboard id=16 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
@iacchus
iacchus / delete_git_submodule.md
Created July 24, 2020 12:50 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@iacchus
iacchus / sample_ssh_server.py
Created May 21, 2020 04:59 — forked from cschwede/sample_ssh_server.py
Sample paramiko SSH server to receive commands
#!/usr/bin/env python
import logging
import socket
import sys
import threading
import paramiko
logging.basicConfig()
logger = logging.getLogger()
@iacchus
iacchus / colors.muttrc
Created September 6, 2019 01:34 — forked from LukeSmithxyz/colors.muttrc
Mutt example colors
# vim: filetype=neomuttrc
# Default index colors:
color index yellow default '.*'
color index_author red default '.*'
color index_number blue default
color index_subject cyan default '.*'
# For new mail:
color index brightyellow black "~N"
color index_author brightred black "~N"
#!env ruby
#
# brew install sox
#
def play(note, octave=1)
"play -q -n synth sq #{note}#{octave} remix - fade 0 .6 .1 norm; "
end
song_notes = %w(B A G A B B B A A A G D D B A G A B B B B A A B A G)
@iacchus
iacchus / play_notes.py
Created April 20, 2017 12:42 — forked from eliasdorneles/play_notes.py
Playing notes with sox
import subprocess
import time
def wait(seconds):
time.sleep(seconds)
def play_note(note='C', duration=4, delay=0):
# requires sox to be installed