Skip to content

Instantly share code, notes, and snippets.

View codl's full-sized avatar
🎧
Now Playing: They Might Be Giants - Nothing's Gonna Change My Clothes

codl codl

🎧
Now Playing: They Might Be Giants - Nothing's Gonna Change My Clothes
View GitHub Profile
{
init: function(elevators, floors) {
let i = 0;
for(let elevator of elevators){
elevator.num = i;
i++;
elevator.on('idle', ()=>{
if(elevator.num % 2 == 1){
elevator.goToFloor(0);
} else {
@codl
codl / _README.md
Last active December 19, 2018 03:42
a nightmare

ive made a mistake

@codl
codl / brotli.vcl
Last active October 7, 2021 00:55
sub vcl_recv {
if(req.http.Accept-Encoding ~ "br") {
set req.http.X-brotli = "true";
}
}
sub vcl_hash {
if(req.http.X-brotli == "true") {
hash_data("br");
}
--[[
Copyright (c) 2021 codl
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-- media_rot.sql
--
-- Copyright codl <codl@codl.fr>
--
-- Permission to use, copy, modify, and/or distribute this software for any
-- purpose with or without fee is hereby granted.
--
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY