Skip to content

Instantly share code, notes, and snippets.

View jneen's full-sized avatar

Jeanine Adkisson jneen

View GitHub Profile
@jneen
jneen / itch_io.rb
Created May 16, 2024 12:53
OmniAuth strategy for Itch.io
module OmniAuth
module Strategies
class ItchIO
include OmniAuth::Strategy
option :name, 'itch_io'
option :client_options,
site: 'https://itch.io/',
authorize_url: 'https://itch.io/user/oauth'
@jneen
jneen / facebook.rules
Created January 3, 2024 17:04
jneen's ublock rules for facebook
! jneen's rules for facebook
www.facebook.com##span:has-text(/^Suggested for you$/):upward(22)
www.facebook.com##span:has-text(/^Follow$/):upward(26)
www.facebook.com##span:has-text(/^Join$/):upward(26)
www.facebook.com##a[href^="https://l.facebook.com"][rel="nofollow noreferrer"]:upward(3)
@jneen
jneen / ableton_timestamps.sh
Last active September 25, 2022 17:28
extract clip start times from an ableton project file in 30fps format at 225bpm
#!/usr/bin/env bash
# .als file
FILE="$1"; shift
SCRIPT="$(cat <<RUBY
\$_.scan(%r[<CurrentStart Value="(.*?)"/><Name Value="(.*?)"/>]) do |start, name|
frame = (start.to_f * 8).round
seconds, frame = frame.divmod(30)
minutes, seconds = seconds.divmod(60)
@jneen
jneen / README.md
Created July 14, 2022 02:03
neovim EunuchNewLine minimal repro

Instructions to reproduce:

  • Run ./run-nvim.sh
  • In the terminal within nvim, run ./run-nvr.sh
  • Close the newly opened init.vim buffer with :q or ^W c or similar.

On my system, this results in the following output:

[0: jneen@lavender nvim-repro ] -> *main $                                                                                                                                       

Keybase proof

I hereby claim:

  • I am jneen on github.
  • I am jneen (https://keybase.io/jneen) on keybase.
  • I have a public key whose fingerprint is 93A8 3342 F6C1 9C88 3518 784F 692D EAAD 282B CEC2

To claim this, I am signing this object:

@jneen
jneen / loop
Last active September 23, 2020 19:32
A script I use to preview looping music
#!/usr/bin/env python3
import pyglet
class LoopingGroup(pyglet.media.SourceGroup):
def _advance(self):
if not self._sources: return
print('loop seek!')
source = self._sources[0]
super()._advance()
@jneen
jneen / audio.sh
Created April 16, 2020 17:58
THE ONE TRUE SETUP
#!/bin/bash
export AUDIO_DEFAULT_CAPTURE=hw:PCH
export AUDIO_DEFAULT_PLAYBACK=hw:PCH
execd() {
echo "$@" >&2
"$@"
}
[translation:info] Error:
File "/home/jneen/src/magritte/vendor/pypy/rpython/translator/goal/translate.py", line 317, in main
drv.proceed(goals)
File "/home/jneen/src/magritte/vendor/pypy/rpython/translator/driver.py", line 551, in proceed
result = self._execute(goals, task_skip = self._maybe_skip())
File "/home/jneen/src/magritte/vendor/pypy/rpython/translator/tool/taskengine.py", line 114, in _execute
res = self._do(goal, taskcallable, *args, **kwds)
File "/home/jneen/src/magritte/vendor/pypy/rpython/translator/driver.py", line 278, in _do
res = func()
File "/home/jneen/src/magritte/vendor/pypy/rpython/translator/driver.py", line 518, in task_compile_c
[translation:info] 2.7.17 (default, Mar 21 2020, 00:47:07)
[GCC 9.3.0]
[platform:msg] Set platform with 'host' cc=None, using cc='gcc', version='Unknown'
[translation:info] Translating target as defined by lib/rpy/targettest
[platform:execute] gcc -c -O3 -pthread -fomit-frame-pointer -Wall -Wno-unused /tmp/usession-unknown-22/gcctest.c -o /tmp/usession-unknown-22/gcctest.o
[platform:execute] gcc /tmp/usession-unknown-22/gcctest.o -pthread -Wl,--export-dynamic -lrt -o /tmp/usession-unknown-22/gcctest
[platform:execute] gcc -c -O3 -pthread -fomit-frame-pointer -Wall -Wno-unused /tmp/usession-unknown-22/gcctest.c -o /tmp/usession-unknown-22/gcctest.o
[platform:execute] gcc /tmp/usession-unknown-22/gcctest.o -pthread -Wl,--export-dynamic -lrt -o /tmp/usession-unknown-22/gcctest
[platform:execute] gcc -c -O3 -pthread -fomit-frame-pointer -Wall -Wno-unused -I/home/jneen/src/magritte/vendor/pypy/rpython/translator/c /tmp/usession-unknown-22/platcheck_0.c -o /tmp/usession-unknown-22/platcheck_0.o
[platform:execute]
\makeatletter
\newwrite\shellout@out
\def\shellout@writeout@start#1{%
\begingroup
\immediate\openout\shellout@out#1%
\let\do\@makeother\dospecials%
\catcode`\^^M\active%
\def\verbatim@processline{%
\immediate\write\shellout@out{\the\verbatim@line}}%