Skip to content

Instantly share code, notes, and snippets.

View dayvonjersen's full-sized avatar

dayvonjersen dayvonjersen

View GitHub Profile
@citizen428
citizen428 / Makefile
Created February 26, 2026 18:10
C preprocessor abuse
CC ?= clang
CFLAGS = -std=c23 -Wall -Werror
run: clean abuse
@./abuse
abuse:
@$(CC) $(CFLAGS) -I. -o abuse abuse.c
clean:
@sug0
sug0 / metaswitch.c
Created August 21, 2018 17:05
Enhanced switch meta control structure in C
#include <stdio.h>
#include <string.h>
#include "metaswitch.h"
int intcmp(const void *x, const void *y)
{
return *(int *)x - *(int *)y;
}
@Nilpo
Nilpo / BIND for the Small LAN.md
Last active February 26, 2025 02:42
How to configure BIND 9 to act as a caching nameserver or as the nameserver for a local domain.
@postpostscript
postpostscript / replify
Last active November 7, 2024 02:47
replify - Create a REPL for any command
#!/bin/sh
command="${*}"
printf "Initialized REPL for `%s`\n" "$command"
printf "%s> " "$command"
read -r input
while [ "$input" != "" ];
do
eval "$command $input"
printf "%s> " "$command"
anonymous
anonymous / IRC client in pure bash 4
Created March 28, 2016 16:57
IRC client written in pure bash using only bash builtin commands and no other binaries.
#!/bin/bash
#no PATH, no way to accidently run any programs
PATH=''
#useful variables
term_height=0
term_width=0
term_scroll_height=0
status_line_row=0
@alexblackie
alexblackie / system.pa.diff
Created March 18, 2016 05:42
Closest I could get to completely disabling ducking in Pulseaudio on Fedora 23 (GNOME) -- `git diff /etc/pulse/system.pa ~/.config/pulse/system.pa`
diff --git a/etc/pulse/system.pa b/home/alex/.config/pulse/system.pa
index 903aa39..92b10f7 100644
--- a/etc/pulse/system.pa
+++ b/home/alex/.config/pulse/system.pa
@@ -54,3 +54,7 @@ load-module module-suspend-on-idle
### Enable positioned event sounds
load-module module-position-event-sounds
+
+### FUCK YOUR FUCKING DUCKING ###
@julz
julz / main.go
Created November 20, 2015 12:39
containersched minicontainer
package main
import (
"fmt"
"os"
"os/exec"
"syscall"
)
func main() {
anonymous
anonymous / dabblet.css
Created August 8, 2015 19:25
"OK"
/*
"OK"
*/
html,body { height: 100%; }
body {
background: linear-gradient(45deg, ghostwhite, ivory);
display: flex;
align-items: center;
justify-content: center;
}
@protrolium
protrolium / ffmpeg.md
Last active April 13, 2026 00:32
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

@jcgregorio
jcgregorio / How_to_use.html
Last active July 17, 2023 14:44
HTML Templating using the HTML <template> element and exactly 100 lines of JS. A cleaned up version of this code is now available at https://github.com/jcgregorio/stamp/.
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8" />
<script src="templating.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<template id=t>