View docker-compose-eccles.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
web: | |
build: . | |
image: tootsuite/mastodon | |
network_mode: host | |
ulimits: | |
as: | |
hard: 6192000000 | |
soft: 6048000000 |
View Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.PHONY: all | |
all: main | |
./main | |
mysqlbinlog --verify-binlog-checksum --start-position 711 output | |
main: main.c | |
gcc main.c -o main |
View sortish.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <algorithm> | |
#include <functional> | |
#include <iostream> | |
#include <vector> | |
#include <utility> | |
#include <string> | |
using namespace std; | |
typedef pair<string,int> product; |
View shader.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# original b&w version from gemini://perso.pw/blog//articles/xorg-black-and-white.gmi | |
# which was itself inspired by https://github.com/bubbleguuum/toggle-monitor-grayscale | |
picom --backend glx --glx-fshader-win "uniform sampler2D tex; | |
uniform float opacity; | |
void main() { | |
vec4 c = texture2D(tex, gl_TexCoord[0].xy); | |
float y = dot(c.rgb, vec3(0.2126, 0.7152, 0.0722)); |
View pi-dac.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include "pico/stdlib.h" | |
#include "hardware/gpio.h" | |
#include "test.h" | |
#define FIRST_GPIO 0 | |
char frame[256][256] = {0}; | |
int main() { |
View scrolling.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* vim:ts=2:sw=2:expandtab | |
*/ | |
#include <ctype.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <termios.h> | |
#include <unistd.h> | |
struct termios orig_termios; |
View despair.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <mysql.h> | |
void retrieve_session_track_data(MYSQL *m) { | |
const char *data; | |
size_t length; | |
for(int type=0; type <= 255; type++) { | |
if (mysql_session_track_get_first(m, (enum enum_session_state_type) type, &data, &length) == 0) { | |
do { |
View keymap.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "nyquist.h" | |
#include "action_layer.h" | |
#include "eeconfig.h" | |
extern keymap_config_t keymap_config; | |
// Each layer gets a name for readability, which is then used in the keymap matrix below. | |
// The underscores don't mean anything - you can have a layer called STUFF or any other name. | |
// Layer names don't all need to be of the same length, obviously, and you can also skip them | |
// entirely and just use numbers. |
View pthread_test.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// gcc -D_GNU_SOURCE=1 -std=c99 a.c | |
#include <sched.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
int f(void *p) { | |
sleep(2); | |
} |
View mastodon-experiment.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
from flask import Flask | |
app = Flask(__name__) | |
@app.route("/") | |
def hello(): | |
return "Hello World!" | |
@app.route("/.well-known/host-meta") | |
def hostmeta(): |
NewerOlder