Skip to content

Instantly share code, notes, and snippets.

@zenlor
zenlor / bee
Created November 1, 2013 16:30
-- BeeAnalyzer 4.3
-- Original code by Direwolf20
-- Hotfix 1 by Mandydax
-- Hotfix 2 by Mikeyhun/MaaadMike
-- 4.0 Major overhaul by MacLeopold
-- Breeds bees with best attributes in this order:
-- fertility, speed, nocturnal, flyer, cave, temperature tolerance, humidity tolerance
-- other attributes are ignored (lifespawn, flowers, effect and territory)
-- Can specify multiple target species to help with keeping to the correct line
-- 4.1 Minor fix for FTB Unleashed, no more inventory module or suckSneaky needed
{
"base_url":"http://example.com/launcher/v1",
"server_id":"",
"name": "MagiTech Madness",
"news":"http://example.com/launcher/v1/index.html",
"address":"",
"revision":"0.0.1",
"version":"1.6.4"
}
@zenlor
zenlor / nginx.conf
Created September 29, 2014 11:14
basic nginx config
server {
listen 80;
server_name experimental.dev;
root /Users/lorenzo/Code/padify-experimental/public;
try_files $uri $uri/index.html $uri.html @app;
# Node.js app
location @app {
@zenlor
zenlor / index.js
Created October 27, 2014 17:48
requirebin sketch
var texta = document.createElement("textarea")
var div = document.createElement("div")
document.body.appendChild(div)
var parse = require('xml-parser')
# Bad dockerfile
# a docker container should run only one command.
#
FROM node:0.10-slim
RUN mkdir -p /app
WORKDIR /app
RUN curl https://raw.githubusercontent.com/hecticjeff/shoreman/master/shoreman.sh > /bin/shoreman &&\
chmod +x /bin/shoreman
@zenlor
zenlor / bookmarklet
Last active August 29, 2015 14:13 — forked from mauricecruz/readme.md
(function(d, u) {
var s = d.createElement('script');
s.src = u;
s.async = !!1;
(d.head || d.getElementsByTagName('head')[0]).appendChild(s);
}(document, 'https://gist.githubusercontent.com/mauricecruz/d20345b25b5c3ca0a4d7/raw/3f0a90112026a1e51a401dcb2fe6f3ca7bf299c0/snippet.js'));
(function(d){var a=d.createElement("script");a.src="https://gist.githubusercontent.com/mauricecruz/d20345b25b5c3ca0a4d7/raw/3f0a90112026a1e51a401dcb2fe6f3ca7bf299c0/snippet.js";a.async=!0;d.head.appendChild(a);}(document))();
@zenlor
zenlor / onchange.sh
Last active August 29, 2015 14:15 — forked from shello/onchange.sh
#!/bin/bash
#
# Watch current directory (recursively) for file changes, and execute a command
# when a file or directory is created, modified or deleted.
#
# Modified from the original by: Senko Rasic <[email protected]>
# https://gist.github.com/senko/1154509
#
# Requires:
# bash
# -- Conky settings -- #
background no
update_interval 1
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
double_buffer yes
@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

@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);