Skip to content

Instantly share code, notes, and snippets.

@pojntfx
pojntfx / main.sh
Last active December 18, 2024 20:39
Bluesky/AT Protocol: cURL API Interaction Cheatsheet
#!/bin/bash
# This script resolves a DID, retrieves an API key, fetches a user's feed,
# and posts a "Hello, world" message to the user's feed.
# Resolve DID for handle
HANDLE='felicitas.pojtinger.com'
DID_URL="https://bsky.social/xrpc/com.atproto.identity.resolveHandle"
export DID=$(curl -G \
--data-urlencode "handle=$HANDLE" \
@siraben
siraben / projects-leaving-freenode.md
Last active March 31, 2023 18:13
List of projects and channels that have left or stayed on Freenode

Note: due to volume, this has been moved to https://github.com/siraben/freenode-exodus

Projects and channels that have left Freenode

This is a (necessarily incomplete) list of projects and channels that have decided to permanently move out of Freenode to https://libera.chat (unless stated otherwise). Please reach out below or on IRC if there's additions or corrections.

Sources are mostly comments I've seen on HN, various IRC channels and web searches.

# include <stdlib.h>
# include <stdio.h>
#include <math.h>
#include <time.h>
/*moomin*/
#define F printf
@HaleTom
HaleTom / print256colours.sh
Last active December 22, 2024 20:16
Print a 256-colour test pattern in the terminal
#!/bin/bash
# Tom Hale, 2016. MIT Licence.
# Print out 256 colours, with each number printed in its corresponding colour
# See http://askubuntu.com/questions/821157/print-a-256-color-test-pattern-in-the-terminal/821163#821163
set -eu # Fail on errors or undeclared variables
printable_colours=256
@CMCDragonkai
CMCDragonkai / regular_expression_engine_comparison.md
Last active December 23, 2024 01:08
Regular Expression Engine Comparison Chart

Regular Expression Engine Comparison Chart

Many different applications claim to support regular expressions. But what does that even mean?

Well there are lots of different regular expression engines, and they all have different feature sets and different time-space efficiencies.

The information here is just copied from: http://regular-expressions.mobi/refflavors.html

@DRMacIver
DRMacIver / ppm-reader.c
Created December 28, 2010 10:20
ppm-reader.c
#include <netpbm/pam.h>
#include <stdbool.h>
#include <stdint.h>
int main(int argc, char **argv){
int c;
while((c = getc(stdin)) != EOF){
ungetc(c, stdin);
struct pam inpam;
tuple *tuplerow;