Skip to content

Instantly share code, notes, and snippets.

@darktwain
darktwain / control-i3-with-mid.md
Created September 6, 2022 23:50 — forked from gyula-ny/control-i3-with-mid.md
Control i3 via IPC with a MIDI device.

We need two NPM packages:

npm install midi i3

The "midi" pacakge is a native package, and has its own dependencies and you'll need have build tools installed. (e.g. build-essential package, python, ALSA (which is typically already installed in any linux environment, and libasound2-dev (in ubuntu) or alsa-lib-devel (in fedora/redhat) package).

We typically need to start with finding the port number of the midi device we want to use:

@darktwain
darktwain / stablediffusionwalk.py
Created August 31, 2022 01:37 — forked from karpathy/stablediffusionwalk.py
hacky stablediffusion code for generating videos
"""
stable diffusion dreaming
creates hypnotic moving videos by smoothly walking randomly through the sample space
example way to run this script:
$ python stablediffusionwalk.py --prompt "blueberry spaghetti" --name blueberry
to stitch together the images, e.g.:
$ ffmpeg -r 10 -f image2 -s 512x512 -i blueberry/frame%06d.jpg -vcodec libx264 -crf 10 -pix_fmt yuv420p blueberry.mp4
@darktwain
darktwain / i3-cheat-sheet.md
Created January 1, 2020 15:25 — forked from miguelmota/i3-cheat-sheet.md
i3 Window Manager Cheat Sheet

i3 Window Manager Cheat Sheet

$mod refers to the modifier key (window/command or alt by default depending on config)

General

  • startx i3 start i3 from command line
  • $mod+<Enter> open a terminal
  • $mod+d open dmenu (text based program launcher)
  • $mod+r resize mode ( or to leave resize mode)
  • $mod+shift+e exit i3