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 / 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"
@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
! 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 / 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
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 / 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
@lukas2511
lukas2511 / daemon.conf
Created February 7, 2015 03:40
my pulseaudio config
[...]
default-sample-format = s32le
default-sample-rate = 48000
default-sample-channels = 6
enable-remixing = yes
enable-lfe-remixing = yes
flat-volumes = no
@lukas2511
lukas2511 / stuff.c
Created November 24, 2014 16:10
3ds: list files in directory
Handle dirHandle;
FS_path dirPath=FS_makePath(PATH_CHAR, "/");
FSUSER_OpenDirectory(NULL, &dirHandle, sdmcArchive, dirPath);
u32 entriesRead=0;
do {
u16 entryBuffer[512];
char data[256];
FSDIR_Read(dirHandle, &entriesRead, 1, (FS_dirent*)entryBuffer);
if(!entriesRead){
print("END");
@lukas2511
lukas2511 / 3dsload.py
Created November 23, 2014 20:37
push file to 3ds
#!/usr/bin/env python
import socket
import sys
import time
TCP_IP = '192.168.100.241'
TCP_PORT = 9000
MESSAGE = open(sys.argv[1], "rb").read();
@lukas2511
lukas2511 / ParcelApp.py
Last active June 8, 2018 20:19
ParcelApp.py
#!/usr/bin/python2
import re
import datetime
import urllib
import urllib2
import cookielib
import os
import json
import curses