Skip to content

Instantly share code, notes, and snippets.

View lukas2511's full-sized avatar
๐Ÿ”“
Your connection to this site is not secured.

Lukas Schauer lukas2511

๐Ÿ”“
Your connection to this site is not secured.
View GitHub Profile
@lukas2511
lukas2511 / genmelody.py
Created February 10, 2015 18:05
Stupid SIP analog phone adapter melody fun
#!/usr/bin/env python
from tones import tones
import math
# format:
#
# freq@-attn,
# freq@-attn,
# freq@-attn
use strict;
use Crypt::OpenSSL::RSA;
use Crypt::OpenSSL::Bignum;
use JSON;
use File::Slurp;
use MIME::Base64;
my $json_file = "private_key.json";
my $json_content = read_file($json_file);
@lukas2511
lukas2511 / cal.c
Created December 22, 2015 16:34
cal.c
/* $NetBSD: cal.c,v 1.10 1998/07/28 19:26:09 mycroft Exp $ */
/*
* Copyright (c) 1989, 1993, 1994
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Kim Letkeman.
*
* Redistribution and use in source and binary forms, with or without
! Xft settings
Xft.dpi: 96
Xft.antialias: true
Xft.rgba: rgb
Xft.hinting: true
Xft.hintstyle: hintfull
! Meslo Setup
URxvt.allow_bold: true
URxvt*font: xft:Meslo LG M:regular:size=11, xft:Symbola:pixelsize=11
@lukas2511
lukas2511 / Makefile
Created January 12, 2017 22:23
create apu2 bios update image
all: boot.img
ROM_VERSION = 160311
MBR = /usr/lib/syslinux/bios/mbr.bin
tmp/apu_tinycore.tar.bz2:
mkdir -p tmp
wget -O $@ http://pcengines.ch/file/apu_tinycore.tar.bz2
tmp/apu_tinycore/.unpacked: tmp/apu_tinycore.tar.bz2
@lukas2511
lukas2511 / sbin_dehydrated-run.sh
Created April 17, 2017 17:41
openwrt dehydrated stuff
#!/bin/bash
hostname="$(uci get "system.@system[0].hostname")"
if [ -n "${1:-}" ]; then
if [ "${1}" = "serve" ]; then
printf "HTTP/1.1 200 OK\r\n"
printf "Server: Socken Katze\r\n"
printf "X-Powered-By: Pink Fluffy Unicorns Dancing On Rainbows\r\n"
printf "Connection: close\r\n"
#!/usr/bin/env python3
from scapy import all as scapy
#import subprocess
INTERFACE = "eth0"
SECRET = b"thecakeisalie"
def do_reply(incoming_pkt_ether):
# get request
server {
listen 443 ssl http2 proxy_protocol;
listen [::]:443 ssl http2 proxy_protocol;
ssl_certificate /etc/dehydrated/certs/search.kurz.pw/fullchain.pem;
ssl_certificate_key /etc/dehydrated/certs/search.kurz.pw/privkey.pem;
server_name search.kurz.pw;
access_log off;
error_log off;
@lukas2511
lukas2511 / Dockerfile
Last active January 15, 2018 15:32
docker container for casparcg testing
# run "xhost local:root" on host machine
FROM debian:latest
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt install -y xorg v4l2ucp libgl1 libraw1394-11 libavc1394-0 libiec61883-0 libgtkextra-dev libnss3 libgconf2-4 vnc4server fluxbox libasound2 vlc
RUN apt -y purge libturbojpeg0
ADD http://de.archive.ubuntu.com/ubuntu/pool/main/libj/libjpeg-turbo/libjpeg-turbo8_1.3.0-0ubuntu2_amd64.deb /deb/libjpeg-turbo8.deb
ADD http://security.ubuntu.com/ubuntu/pool/main/libg/libgcrypt11/libgcrypt11_1.5.3-2ubuntu4.5_amd64.deb /deb/libgcrypt11.deb
RUN dpkg -i /deb/*.deb
@lukas2511
lukas2511 / Makefile
Created February 13, 2018 14:19
attiny13 toggle pin deepsleep foo
MCU=attiny13
MCUFREQ=-DF_CPU=1000000L
PROGTYPE=stk500v1
SOURCES=main.c
TARGET=main
.PHONY: build upload
build: $(TARGET).hex