Skip to content

Instantly share code, notes, and snippets.

@iacchus
iacchus / gist:594530a0a75060136da94006d363e8ff
Created June 10, 2025 20:26 — forked from narrowdesign/gist:361eb935a42daab5cf4c
Touch events that behave exactly like mouse events while mouse dragging or touch moving.
// vars to keep track of the "mouse" during touchmove
var mouseX;
var mouseY;
// create the custom events so you can dispatch them later
var touchover = new Event("touchover");
var touchout = new Event("touchout");
var touchup = new Event("touchup");
var element = document.getElementById("dropTargetDivName");
@iacchus
iacchus / jupyter-lab-build-memory.md
Created June 9, 2025 15:50 — forked from ingeniumstudio/jupyter-lab-build-memory.md
How to build jupyter lab assets without running out-of-memory

How to build jupyter lab assets without running out-of-memory

  1. Limit the amount of memory used with
export NODE_OPTIONS='--max_old_space_size=2096'
  1. Build
@iacchus
iacchus / beautiful.rest.api.docs.in.markdown.md
Created May 31, 2025 17:36 — forked from azagniotov/beautiful.rest.api.docs.in.markdown.md
Example to create beautiful REST API docs in Markdown, inspired by Swagger API docs.
@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/1.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()