Skip to content

Instantly share code, notes, and snippets.

View dayvonjersen's full-sized avatar

dayvonjersen dayvonjersen

View GitHub Profile
@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 January 17, 2024 16:34
How to configure BIND 9 to act as a caching nameserver or as the nameserver for a local domain.
@danielrw7
danielrw7 / replify
Last active October 24, 2023 12:03
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 May 15, 2024 18:27
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>
@grugq
grugq / gist:03167bed45e774551155
Last active April 6, 2024 10:12
operational pgp - draft

Operational PGP

This is a guide on how to email securely.

There are many guides on how to install and use PGP to encrypt email. This is not one of them. This is a guide on secure communication using email with PGP encryption. If you are not familiar with PGP, please read another guide first. If you are comfortable using PGP to encrypt and decrypt emails, this guide will raise your security to the next level.