Skip to content

Instantly share code, notes, and snippets.

@gue-ni
gue-ni / b64.c
Last active April 29, 2021 08:28
/*
@author: Jakob Maier
@brief: simple base64 encoder/decoder
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <assert.h>
#include <unistd.h>
#!/bin/bash
# client <ip> <port>
nc $1 $2 | play -r 32k -t raw -e s -b 16 -c 1 -V1 -
#!/bin/bash
# server.sh <freq> <port>
rtl_fm -f ${1}M -M fm -s 170k -A fast -r 32k -l 0 -E deemp | nc -lvp ${2}
@gue-ni
gue-ni / Makefile
Last active August 17, 2021 08:06
Makefile
# $@ := output
# $< := first dependency
CC = gcc
CFLAGS = -std=c99 -pedantic -Wall -g
PROGS = test_program
all: $(PROGS)
rm -f *.o
body {
margin: 0;
font-family: Roboto, Arial, sans-serif;
color: #3c4043;
line-height: 1.25rem;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;
@gue-ni
gue-ni / perfect.css
Created May 25, 2021 09:37
More minimal css
body {
max-width: 650px;
margin: 40px auto;
padding: 0 10px;
font: 18px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
color: #444;
}
h1,
h2,
#!/bin/bash
if [ -z "$*" ]; then
echo "No args";
exit 0;
fi
# variables
LOGFILE=$1
LOGFILE_GZ=$LOGFILE.*
@gue-ni
gue-ni / docker-compose.yml
Last active October 4, 2021 06:51
Run PostgreSQL in Docker
version: "3"
services:
db:
image: postgres
restart: always
ports:
- 5432:5432
environment:
POSTGRES_USER: postgres # default is postgres, same as POSTGRES_DB
@gue-ni
gue-ni / AdBlock.js
Last active February 23, 2022 11:56
AdBlock für derstandard.at
// ==UserScript==
// @name Der Standard AdBlock
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Easy way to block ads on derstandard.com
// @author Jakob Maier
// @match https://www.derstandard.at/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
@gue-ni
gue-ni / userscript.js
Last active November 28, 2021 15:09
Color Hackernews link for better readability
// ==UserScript==
// @name Color hackernews links
// @namespace http://tampermonkey.net/
// @version 1.0
// @description try to take over the world!
// @author You
// @match https://news.ycombinator.com/
// @icon https://www.google.com/s2/favicons?domain=ycombinator.com
// @grant GM_addStyle
// ==/UserScript==