Skip to content

Instantly share code, notes, and snippets.

View clonejo's full-sized avatar

Feiko Nanninga clonejo

  • Aachen / Leer, Germany
View GitHub Profile
@anjomro
anjomro / WIFIonICE-Automatic-Login.md
Last active April 4, 2024 23:05 — forked from hacker-bastl/bahn.sh
WIFIonICE Automatic Login

WIFIonICE Automatic Login

This connector intends to automate the process of logging in into the public wifi inside of an IC /ICE of the German railways. The adapter enables does enable you to choose and keep a custom DNS server.

Usage on Linux

The script should be usable on most Linux systems, at least if the following requirements are met:

  • bash
  • ip
  • dig
@niko
niko / README.md
Last active July 19, 2024 06:50 — forked from ePirat/spec.md
Icecast Protocol specification

An collection of documents about icecast/shoutcast streaming.

@cedws
cedws / defer.sh
Last active July 5, 2024 13:31
Go-like defer 'keyword' for shell
#!/bin/sh
DEFER=
defer() {
DEFER="$*; ${DEFER}"
trap "{ $DEFER }" EXIT
}
@phemmer
phemmer / defer.sh
Last active June 28, 2024 12:48
bash defer function - just like go's defer()
function _run_deferred() {
local _depth="$BASHPID.${#FUNCNAME[@]}"
[[ "$_depth" != "$_deferred_depth" ]] && return
local opt=$-
set +e
for (( i=${#_deferred[@]} - 1; i >= 0; i-- )); do
eval "${_deferred[i]}"
done
[[ "$opt" == *e* ]] && set -e
}

The backend's code is now on Github, as are the specs.

@badboy
badboy / PKGBUILD
Created April 15, 2015 11:11
Sync-My-L2P for Arch Linux
# Maintainer: Jan-Erik Rediger <badboy at archlinux dot us>
pkgname=sync-my-l2p
pkgver=0.2.0
pkgrel=1
pkgdesc="Sync the L2P of the RWTH Aachen with your Computer"
arch=('i686' 'x86_64')
url="http://www.sync-my-l2p.de/"
license=('GPL')
depends=('qt5-base' 'hicolor-icon-theme')
@jaredmorrow
jaredmorrow / read_write_fifo_erlang.md
Last active April 22, 2023 20:05
Reading and Writing to Fifo (named pipes) in Erlang

edit

@akash-akya pointed out in the comments that the file module supports named pipes since OTP 20. So none of this post is really needed anymore if you are on >= OTP 21.


Erlang and Named Pipes

The intention of this post is to provide a solution (with examples) to a somewhat uncommon issue in Erlang. I hate searching for answers to the same problems over and over, and I had a hard time finding answers to this particular problem, so I wrote it all down once I figured it out. If one day you decide to read and write data through fifo's (named pipes) and then decide you want to read or write the other end of the pipe from Erlang, this post is for you.

@andytill
andytill / Erlang Project Ideas.md
Last active February 20, 2023 06:00
Erlang Project Ideas

When I started erlang, I had a hard time thinking of ideas for projects to improve my skills. Now I have way too many ideas to possibly implement Myself. Since I actually want these projects to exist so I can use them (everlasting glory coming secondary to some handy tools) I have written them up here. Feel free to try them out. I'm open to questions and suggestions.

swagger for erlang

swagger is a JSON spec for REST APIs. Once you have written a spec in swagger, it can generate documentation (demo) and REST handlers.

An erlang swagger library should take swagger specs and generate cowboy_rest handlers for them.

Difficulty: low

@liquidgecka
liquidgecka / cron_helper.sh
Last active September 28, 2023 15:35
Cron helper
#!/bin/bash
usage() {
cat << EOF
Usage: $0 [OPTION]... COMMAND
Execute the given command in a way that works safely with cron. This should
typically be used inside of a cron job definition like so:
* * * * * $(which "$0") [OPTION]... COMMAND
Arguments:
@ericbmerritt
ericbmerritt / Makefile
Last active August 11, 2023 09:35
Universal drop in Makefile for Erlang projects that use rebar
# Copyright 2012 Erlware, LLC. All Rights Reserved.
#
# This file is provided to you under the Apache License,
# Version 2.0 (the "License"); you may not use this file
# except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,