Skip to content

Instantly share code, notes, and snippets.

The Freenode resignation FAQ, or: "what the fuck is going on?"

IMPORTANT NOTE:

It's come to my attention that some people have been spamming issue trackers with a link to this gist. While it's a good idea to inform people of the situation in principle, please do not do this. By all means spread the word in the communities that you are a part of, after verifying that they are not aware yet, but unsolicited spam is not helpful. It will just frustrate people.

Update 3 (May 24, 2021)

A number of things have happened since the last update.

@Peetz0r
Peetz0r / compact.css
Last active November 2, 2021 16:04
Custom stylesheet to make Element nicer and more compact (use with Stylus, or go to https://element.glitch.im/ which injects this gist's css into Element)
/*
* Most recently tested with element-web 1.9.0 and the "experimental, compact IRC style layout" enabled
* Questions? @peetz0r:glitch.im
* Source: https://gist.github.com/Peetz0r/6a5fce5e0e39f4a7b87228608f6a00f4
* Author: Peetz0r <element-compact-css@haas-en-berg.nl>
* License: GPLv3
*/
/* Make room on the bottom for the url hover bar */
.mx_MessageComposer {
@brenhinkeller
brenhinkeller / lispmode.jl
Last active July 4, 2023 22:30
Bare-bones REPL for Julia's secret built-in s-expression syntax, in under 30 lines
to_expr(x) = x
to_expr(t::Tuple) = Expr(to_expr.(t)...) # Recursive to_expr implementation courtesy of Mason Protter
lisparse(x) = to_expr(eval(Meta.parse(x))) # Note that the `eval` in here means that any normal (non-s-expression) Julia syntax gets treated a bit like a preprocessor macro: evaluated _before_ the s-expression syntax is compiled and evaluated
function lispmode()
# READ
printstyled("\nlisp> ", color=:magenta, bold=true)
l = readline()
while l !== "(:exit)"
try # So we don't get thrown out of the mode
# EVAL
@gullyn
gullyn / flappy.html
Last active November 28, 2023 18:23
Flappy bird in 205 bytes (improved!)
<body onload=z=c.getContext`2d`,setInterval(`c.width=W=150,Y<W&&P<Y&Y<P+E|9<p?z.fillText(S++${Y=`,9,9|z.fillRect(p`}*0,Y-=--M${Y+Y},P+E,9,W),P))):p=M=Y=S=6,p=p-6||(P=S%E,W)`,E=49) onclick=M=9><canvas id=c>
@affans
affans / covid19 - basic dynamical system
Last active March 9, 2021 17:00
COVID-19 Model Implemention
# Affan Shoukat
# Center for Infectious Disease Modelling and Analysis
# Yale University, Dec 2020
# Repository: https://gist.github.com/affans/f529f8cd727989143c979afd9174b984
module covid19ode
using OrdinaryDiffEq
using Parameters
using LinearAlgebra
using ForwardDiff
using ProgressMeter
@skeeto
skeeto / README.md
Last active December 20, 2021 14:00
AI driving simulation
@erkin
erkin / regexp-checker.rkt
Created October 30, 2020 23:04
A graphical regular expression checker in plain Racket, supports PCRE
#lang racket/base
(require racket/gui/base
racket/class
racket/list
racket/string)
(define program-name "regexp-checker")
(define program-version "v0.1")
(define version-message
@lrvick
lrvick / github-troll.md
Last active April 22, 2024 09:12
Trolling Github's DMCA repo with their own security flaws.
@skeeto
skeeto / keycount.c
Last active November 24, 2020 11:04
6x6 Hotel Key Card Counter
/* 6x6 Hotel Key Card Counter
* $ cc -fopenmp -O3 -march=native keycount.c
* Ref: https://possiblywrong.wordpress.com/2020/10/24/counting-hotel-key-cards/
*/
#include <stdio.h>
static long long
transpose(long long x)
{
return (x << 5 & 0x408102040) |
// Shut-the-Box Monte Carlo method winning odds calculator.
//
// This simulation plays all possible strategies in parallel, reporting the
// percentage of winnable games.
// Ref: https://youtu.be/IRQiyXkoLAM
//
// This is free and unencumbered software released into the public domain.
#include <stdio.h>
#include <string.h>