pico-8
PICO-8 is a fantasy console for making, sharing and playing tiny games and other computer programs. When you turn it on, the machine greets you with a shell for typing in Lua commands and provides simple built-in tools for creating your own cartridges.
Great emacs folding extension: yafolding
I like to bind double-Y to show/hide a fold with chord-mode:
(key-chord-define-global "YY" 'yafolding-toggle-element)
Activate emacs windows with mouse
Put this in ~/.emacs
;; mouse activate window - eg for neotree (setq focus-follows-mouse t) (setq mouse-autoselect-window t)
Test websockets server in python 3
Negative lookahead assertion rule in procmail
Say in procmail you want a rule that puts subjects like:
“Sale Alert: Howies” (or anything other than Howies)
in your inbox but not
“Sale Alert: Banana Republic”
You can do this with a negative lookahead assertion like so:
:0: * ^Subject: (You have sale alerts|Sale Alert):? *(?!Banana) $DEFAULT
python pipenv package for fedora 27
Package from the COPR didn’t work for me due to outdated dependencies, so I’ve modified the SPEC file it’s based on.
To create RPM:
- Download SPEC file (above)
- Follow “Preparing your system to create RPM packages”
- Download pipenv-11.1.3.tar.gz
- Run
fedpkg --release f27 local
Note: I’ve only created python 3 package.
Enabling web access log in JBoss
Check mysql database integrity
With nagios/icinga: check_mysql_dbs
Fix MIME types of proxied content in Apache
In Apache 2.2 at least, if you have downstream (eg proxied from Appserver) content with the wrong MIME type you cannot fix it with ForceType as this only works on local files. What you want to do is something like this:
Header set Content-Type application/javascript
This is particularly important nowadays as content sniffing is bad.