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
/*
born to queue
sidekiq is a fuck
retry all 1989
i am task man
*/
@-moz-document regexp(".*/sidekiq(?:$|/.*)") {
a[href$="/morgue"] span.desc::after {
content: " cops";

funny not 256 colour css filter

this does not use the traditional "RRRGGGBB" 256 colour palette for no authenticity

how to

  1. put filter.svg at the root of the web site

  2. paste the contents of style.css into your css

Drawpile: GAMPS IS BACK edition

It is time to draw rubbish.

Please join us and draw rubbish with us.

Getting on there

@codl
codl / 2017.md
Created December 31, 2017 19:22

codl's 2017 in review

In 2017 I

  • turned 23
  • took up photography
  • got commissioned a few times, for art and for code
  • crashed my car zero times, compared to twice in 2016
  • got a bike
  • got my bike stolen
import pickle
from mastodon import Mastodon
INSTANCE = 'http://localhost:3000'
with open('app_credentials.pickle', 'ab+') as f:
try:
f.seek(0)
(client_id, client_secret) = pickle.load(f)
except Exception:
["According to all known laws of aviation, there is no way a bee should be able to fly.",
"Its wings are too small to get its fat little body off the ground.",
"The bee, of course, flies anyway because bees don't care what humans think is impossible.",
"Yellow, black.",
"Yellow, black.",
"Yellow, black.",
"Yellow, black.",
"Ooh, black and yellow!",
"Let's shake it up a little.",
"Barry!",
According to all known laws
of aviation,
there is no way a bee
should be able to fly.
Its wings are too small to get
its fat little body off the ground.
The bee, of course, flies anyway
#!/bin/bash
set -eufo pipefail
SIZE=0
F=$(mktemp --tmpdir b2-bucket-size.json.XXXX)
b2 list-file-versions $1 > $F
while true; do
SIZE=$[$SIZE + $(jq -r '[.files[].contentLength] | add' $F)]
from threading import Thread
from functools import wraps
def background(fun):
@wraps(fun)
def wrapper(*args, **kwargs):
Thread(target=fun, args=args, kwargs=kwargs).start()
return wrapper
let pico8_gpio = Array(128);
(() => {
let clock_start = Date.now();
function update_clock(){
let t = Date.now() - clock_start;
for(let i = 0; i < 6; i++){
pico8_gpio[i] = Math.floor(((t / 100) % Math.pow(256, i+1)) / Math.pow(256, i))
}
requestAnimationFrame(update_clock);
}