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
@codl
codl / a.markdown
Last active April 12, 2017 18:47

Federation 101, or Why The Federated Timeline Isn't The Same Everywhere

You've probably noticed that the fediverse is made up of hundreds of loosely connected instances. These instances don't share every single message to every other instance, that would be unsustainable and each one would end up with a copy of the whole network. (bitcoin joke here) Each instance only needs to know about some users, and some posts.

Let's set up a scenario, you run an instance A, with a user: u1. There are other instances and users, we'll think about them soon. So, which messages does your instance know about?

  • First, messages from your users, unsurprisingly, are known to your instance
  • Second, if a user, say u1@A, follows someone on another server, say u2@B, A will ask B to notify it whenever u2 posts. Any posts from u2 from that point forward will be known to A. Note how this isn't retroactive, your server won't go and download their old posts!
  • Third, if a remote user, say u3@C mentions one of your users: "@u1@A h
@codl
codl / _.markdown
Last active April 11, 2017 20:35
whoops lol

honk

@codl
codl / cave.py
Last active February 10, 2019 00:01
"""
cave.py
this thing will tell you where to go to solve the infamous volcanic cave maze
in kingdom of loathing's "Me and My Nemesis" quest
it only has support for one of the layouts because i keep getting that one
if you need another layout you can either edit this scrips or just use the maps on kolwiki and leave me alone.
i will add support for more layouts as i encounter them
03000000022000000090000011010000,8Bitdo NES30 Pro 8Bitdo NES30 Pro,a:b0,b:b1,y:b4,x:b3,start:b11,back:b10,leftstick:b13,rightstick:b14,leftshoulder:b8,rightshoulder:b9,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,

codl's ______ of the year 2016

Everyone loves lists. I made some lists of things I enjoyed throughout 2016. These aren't necessarily things that have come out in 2016.

Albums

  • Lemon Demon - [Spirit Phone][]
  • IGLOOGHOST - [Little Grids][]
@codl
codl / awful.user.css
Created November 9, 2016 08:51
this truly is something awful!!
@-moz-document domain("forums.somethingawful.com") {
blockquote {
max-height: 10em;
overflow: auto;
}
div#content {
max-width: 65em;
margin: 0 auto;
}

this script will tell u which of your twitter followers are verified

put your credentials in the TWITTER_TOKEN, TWITTER_SECRET, TWITTER_CONSUMER_KEY and TWITTER_CONSUMER_SECRET environment variables. or in the code if you are a fool

it will definitely break if you have more than 3000 followers because of twitter's rate limits

bye

@codl
codl / maybe
Created October 12, 2016 19:30
#!/bin/bash
trap true EXIT
while true; do
if [[ $[$RANDOM % 2] == 0 ]]; then
echo n
else
echo y
fi
@codl
codl / README.md
Last active September 24, 2016 08:17
$ git im codl
you're codl
$ git init demo
$ cd demo
$ git commit --allow-empty -m "test"
$ git log -1
commit 02e55035e152b410790d590f78c429a8c183c19d
Author: codl <codl@codl.fr>
Date: Sat Sep 24 10:15:31 2016 +0200
@codl
codl / customer-support-sucks.txt
Created August 4, 2016 20:25
the coolest song ever in the world
-= Tabs for customer support sucks =-
==================================================================================
Guitar Help
==================================================================================
o = Open
m = Palm-Muted
x = Harmonics