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 / termux.properties
Created June 8, 2024 12:27
termux keyboard
## Configuration with additional popup keys (swipe up from an extra key)
extra-keys = [ \
[ \
{key: ESC, display: ""}, \
{key: ESC, popup: {macro: "CTRL f d", display: "tmux exit"}}, \
{key: CTRL, popup: {macro: "CTRL f BKSP", display: "tmux ←"}}, \
{macro: "ESC :q ENTER", display: ":q", popup: {macro: "ALT g", display: A-g}}, \
{macro: ",t", display: "tree", popup: {macro: ", n", display: "focus"}}, \
{macro: 'y :%s/ CTRL r " //gic LEFT LEFT LEFT LEFT', display: ":%s"}, \
{macro: "exa SPACE --long SPACE --tree ENTER", display: "exa", popup: {macro: "lsd SPACE --long SPACE --tree ENTER", display: "lsd"}}, \
@iacchus
iacchus / termux.properties
Created May 9, 2024 22:03
termux keyboard (.termux/termux.properties)
## Configuration with additional popup keys (swipe up from an extra key)
extra-keys = [ \
[ \
{key: ESC, display: ""}, \
{key: ESC, popup: {macro: "CTRL f d", display: "tmux exit"}}, \
{key: CTRL, popup: {macro: "CTRL f BKSP", display: "tmux ←"}}, \
{macro: "ESC :q ENTER", display: ":q", popup: {macro: "ALT g", display: A-g}}, \
{macro: 'y :%s/ CTRL r " //gic LEFT LEFT LEFT LEFT', display: ":%s"}, \
{macro: "cd SPACE TAB", display: "cd", popup: {macro: "ALT g", display: A-g}}, \
{macro: 'CTRL r', display: "<C-r>"}, \
#!/usr/bin/env python
import sys
# DOT = '.'
DOT = '·'
args = sys.argv[1:]
dotted = [DOT.join(arg).upper() for arg in args]
@iacchus
iacchus / nostr-npub-to-hex.ipynb
Last active November 29, 2023 20:51
How to convert Nostr npub (bech32) key to base16 (hexadecimal) using python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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 / termux-keys-tab
Created June 21, 2023 17:06
Termux keyboard
## Configuration with additional popup keys (swipe up from an extra key)
extra-keys = [[ \
{key: KEYBOARD, popup: {macro: "CTRL d", display: exit}}, \
{key: ESC, popup: {macro: "CTRL f d", display: "tmux exit"}}, \
{key: CTRL, popup: {macro: "CTRL f BKSP", display: "tmux ←"}}, \
{key: ALT, popup: {macro: "CTRL f TAB", display: "tmux →"}}, \
{macro: "ALT c", display: "cd", popup: {macro: "ALT g", display: A-g}}, \
{macro: "vim SPACE $(fzf) ENTER", display: "vim", popup: {macro: "ALT g", display: A-g}}, \
{macro: "ESC :w ENTER", display: ":w", popup: {macro: "ALT g", display: A-g}}, \
{macro: "ESC :q ENTER", display: ":q", popup: {macro: "ALT g", display: A-g}}, \
# https://wiki.archlinux.org/title/android
# Command-Line Tools - https://developer.android.com/studio/releases/cmdline-tools
export PATH="~/Android/Sdk/tools/bin/:$PATH"
# SDK Build-Tools - https://developer.android.com/studio/releases/build-tools
export PATH="~/Sdk/build-tools/30.0.3/:$PATH"
# SDK Platform-Tools - https://developer.android.com/studio/releases/platform-tools
export PATH="~/Sdk/platform-tools/:$PATH"