Skip to content

Instantly share code, notes, and snippets.

View zenlor's full-sized avatar
⚖️
balancing terrain generation

Lorenzo Giuliani zenlor

⚖️
balancing terrain generation
View GitHub Profile
@zenlor
zenlor / keybase.md
Created November 14, 2017 15:44
keybase.md

Keybase proof

I hereby claim:

  • I am zenlor on github.
  • I am lor (https://keybase.io/lor) on keybase.
  • I have a public key ASDBEF-e_ok3qkehIC-WZb801EgNASjlQH_VUXHY7PrxSgo

To claim this, I am signing this object:

### Keybase proof
I hereby claim:
* I am aliem on github.
* I am lor (https://keybase.io/lor) on keybase.
* I have a public key ASDZmW2aFDCI9Kj35QZzurwDsNHqFlqD5_UVGXy4cveC3Ao
To claim this, I am signing this object:
@zenlor
zenlor / controller.sh
Last active April 30, 2017 19:03
VMS2 + xwax
#!/bin/dash
[ "$TRACE" ] && set -x
DRIVER="alsa"
XWAX_OPTS="-k -q 40 -g 800x480 --no-decor"
LIBRARY_FOLDER="/media"
onexit() {
echo "SIGINT received"
echo "sending SIGTERM to all processes"
set noautofocus
let scrollstep=230
set smoothscroll
let scrollduration= 200
let barposition = "bottom"
let locale = "en"
let hintcharacters = "hjklasdfgyuiopqertnmzxcvb"
let mapleader = ","
let blacklists = ["https://mail.google.com/*","*://mail.google.com/*","@https://mail.google.com/mail/*"]
@zenlor
zenlor / pretty-pragmata.el
Created November 30, 2016 22:47 — forked from plaidfinch/pretty-pragmata.el
Mappings for prettify-symbols-mode to enable Pragmata Pro's ligatures in Emacs. I've taken some slight liberties with the original ligature map, to suit my own tastes.
;; PRETTIFY SYMBOLS (with Pragmata Pro)
(defun setup-pragmata-ligatures ()
(setq prettify-symbols-alist
(append prettify-symbols-alist
'(("!!" . ?)
("!=" . ?)
("!==" . ?)
("!≡" . ?)
("!≡≡" . ?)
("!>" . ?)
@zenlor
zenlor / hook.sh
Last active November 21, 2016 10:56 — forked from jimmycuadra/hook.sh
letsencrypt.sh hook script for dns-01 challenge using AWS Route 53
#!/bin/sh
HOSTED_ZONE="Route53 zone ID"
payload() {
local action=$1
cat <<EOF
{
"Changes": [
{ "Action": "${action}",
@zenlor
zenlor / sql-tdd.markdown
Created November 14, 2016 16:54 — forked from abrkn/sql-tdd.markdown
Migrations and testing for PostgreSQL using node.js and Travis-CI

Migrations and testing for PostgreSQL using node.js and Travis-CI

We're looking to add a column to the table user called admin (boolean) in an existing database.

Project layout

migrations
#!/bin/bash
# Config
EFI_PART=/dev/sda1
LUKS_PART=/dev/sda2
EFI_MNT=/root/boot
# Utils
rbtohex() { ( od -An -vtx1 | tr -d ' \n' ) }
hextorb() { ( tr '[:lower:]' '[:upper:]' | sed -e 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI'| xargs printf ) }
@zenlor
zenlor / foo.js
Last active July 7, 2016 14:44
lispy js failure
// People should take a look at lisp
// this code would be much more readable
exports.handler = function handler(request, reply) {
const code = request.query.code;
const state = request.query.state;
const stateLink = (new Buffer(state, 'base64')).toString('utf8');
const key = getUserKey(state);
const id = getId(state);
@zenlor
zenlor / Hello.md
Created December 14, 2015 21:53
My message to answer to survive renting in Amsterdam

Hello there!

I need an apartment/room/corner-inside-another-room ASAP since I'm about to begin to work in Amsterdam (Amstelveen actually) the 4th of January.

I only need a place with registration available so I can finally move from London.

If you answer, I'm very sorry for being so rude, but agencies and