Skip to content

Instantly share code, notes, and snippets.

evdev:atkbd:dmi:bvn*:bvr*:bd*:svn*:pn*:pvr*
KEYBOARD_KEY_47=home
KEYBOARD_KEY_48=up
KEYBOARD_KEY_49=pageup
KEYBOARD_KEY_4b=left
KEYBOARD_KEY_4d=right
KEYBOARD_KEY_4f=end
KEYBOARD_KEY_50=down
KEYBOARD_KEY_51=pagedown
KEYBOARD_KEY_3a=search
@refi64
refi64 / lcss.css
Created June 7, 2018 22:14
LHTML/LCSS
/*
Major differences from CSS3:
- Only selectors are `.class`, `element`, `*` (as well as multi selectors, e.g. `.a, .b`).
- Only a few properties are supported.
- Styles only define basic looks (so no box model or similar).
- Things like 'initial' and 'inherit' don't exist.
- Styles in <style> tags MUST before the elements with those classes.
*/
@refi64
refi64 / PKGBUILD
Created April 29, 2018 19:49
mutter 3.29.1 w/ patches for Arch
# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Maintainer: Ionut Biru <ibiru@archlinux.org>
# Contributor: Michael Kanis <mkanis_at_gmx_dot_de>
pkgname=mutter
pkgver=3.29.1
pkgrel=1
pkgdesc="A window manager for GNOME"
url="https://git.gnome.org/browse/mutter"
@refi64
refi64 / keybase.md
Last active August 19, 2018 14:55
keybase.md

Keybase proof

I hereby claim:

  • I am kirbyfan64 on github.
  • I am refi64 (https://keybase.io/refi64) on keybase.
  • I have a public key ASC0MAUdoo0JtC9sw5EKyAwgpeBm0nFIDeLLNJj5mrH2Vwo

To claim this, I am signing this object:

howl.bindings.push
editor:
ctrl_q: (editor) ->
if howl.app.editor.buffer.mode.name == "elm"
howl.command.run 'elm-doc'
else
howl.command.run 'show-doc-at-cursor'
@refi64
refi64 / config.rst
Last active April 23, 2023 14:24
Configuring evdev RPCS3 joysticks

Configuring evdev RPCS3 joysticks

The evdev joystick code in RPCS3 is primarily designed to use XBox controllers by default. For other controllers, you'll probably need to make a few changes.

The config file

Configuration is stored in $HOME/.config/rpcs3/config_linuxjoystick.yml. The easiest way to test your joystick is with the PS3 Game Pad Test homebrew.

@refi64
refi64 / flashinst.sh
Last active October 29, 2018 18:50
Install Flash on Chromium OS
# INSTRUCTIONS:
# Enter the terminal (Ctrl-Alt-F2, username is "chronos" and password is either blank or "password" for ArnoldTheBat's builds) and run:
#
# curl -L https://goo.gl/BBV79Q | sudo bash
#
# to install. You'll likely have to re-enter the password "password".
# Attempts to grab the latest Flash version straight from Adobe's website.
# Should be a bit more bullet-proof than some of the other flash installer scripts.
import re
def myfunc(s):
m = re.match(r'^(.+?)\1+$', s)
return len(s)/len(m.groups()[0])
print(myfunc('abccbaabccba'))
print(myfunc('abcabcabcabc'))
@refi64
refi64 / word.k
Created March 8, 2016 21:44
Surrounds the input words with quotes and puts them (comma-seperated) into 84-column lines
w:0:"/dev/stdin"
`0:(" ",)'{y:"'",y,"', ";:[80<(#y)+#*|x;x,,y;:[#x;(-1_ x),,(*|x),y;,y]]}/(,()),{:[(*|x)~(#*|x)#y;(-1_ x),(,y),(-1#x);x,,y]}/(,()),?w@<w
def fuzzyfinder(p, l):
return map(lambda t: t[0], sorted(filter(lambda t: all(map(lambda x: x != -1, t[1])), map(lambda s: (s,map(s.find, p)), l)), key=lambda t: t[1]))