Skip to content

Instantly share code, notes, and snippets.

View sreimers's full-sized avatar

Sebastian Reimers sreimers

View GitHub Profile
@sreimers
sreimers / failover.sh
Created February 19, 2016 06:45
Hetzner simple Failover Script
#!/bin/bash
#------------------------------------------------------------
# title :failover.sh
# description :This script will call hetzner failover api
# author :Sebastian Reimers <[email protected]>
# date :18.02.2016
# version :0.1
#------------------------------------------------------------
# settings
@sreimers
sreimers / stack_traces.c
Created September 3, 2016 16:31 — forked from jvranish/stack_traces.c
An example of catching exceptions and printing stack traces in C on Windows, Linux and OS X
/* compile with:
on linux: gcc -g stack_traces.c
on OS X: gcc -g -fno-pie stack_traces.c
on windows: gcc -g stack_traces.c -limagehlp
*/
#include <signal.h>
#include <stdio.h>
#include <assert.h>
@sreimers
sreimers / CoreOs2JiffyBox.md
Created September 25, 2016 16:44 — forked from andreasheil/CoreOs2JiffyBox.md
CoreOS und JiffyBox

CoreOS und JiffyBox

JiffyBox erstellen

  1. Klick auf Neue JiffyBox erstellen
  2. Distribution ist egal (wird später überschrieben)
  3. Kennwort ist auch egal (wird ja auch überschrieben)
  4. Warten bis die JiffyBox erstellt ist
/*
A simple sound library for CSE 20211 by Douglas Thain
For course assignments, you should not change this file.
For complete documentation, see:
http://www.nd.edu/~dthain/courses/cse20211/fall2013/wavfile
*/
#include "wavfile.h"
#include <stdio.h>
/*
A simple sound library for CSE 20211 by Douglas Thain
For course assignments, you should not change this file.
For complete documentation, see:
http://www.nd.edu/~dthain/courses/cse20211/fall2013/wavfile
*/
#include "wavfile.h"
#include <stdio.h>
@sreimers
sreimers / README.md
Created March 9, 2017 14:32 — forked from psi-4ward/README.md
CoreOS mdadm RAID1 for ROOT

CoreOS mdadm RAID1 for ROOT

  • Setup SoftwareRAID for the CoreOS root partition without data-loss.
  • Only for ext4!
  • The Trick is to use the right volume label and fs-types :)
  • We assume CoreOS is on /dev/sdaX and the second RAID Device is /dev/sdb
  • Drawback: only / gets mirrored, Node goes down when sda fails
  1. Boot into any recovery system like Grml
  2. If not already done: install CoreOS
@sreimers
sreimers / hetzner-cloud.tf
Created March 4, 2018 12:13
Hetzner Cloud Terraform multiple servers and datacenters
variable "hcloud_token" {}
variable "zones" {
default = {
zone0 = "nbg1-dc3"
zone1 = "fsn1-dc8"
}
}
# Configure the Hetzner Cloud Provider
ua: sipsess connect via TCP 148.251.217.82:5060 --> 192.168.178.79:43774
ua: using AF from sdp offer: af=AF_INET
call: alloc with params laddr=192.168.178.79, af=AF_INET, use_rtp=1
ice: new session with TURN-server at stun.studio.link (username=turn200300)
stream: audio: starting mediaenc 'dtls_srtp' (wait_secure=1)
call: use_video=0
ice: resolved TURN-server to address 95.179.254.217:3478
audio: added interface: enp0s31f6:192.168.178.79 (local prio 10)
ice: relay gathered for comp 1 (0 OK)
ice: all components gathered.
From 49834b7afd0fe31660108271ef7657a34caa6a6d Mon Sep 17 00:00:00 2001
From: "Alfred E. Heggestad" <[email protected]>
Date: Sat, 7 Oct 2017 15:49:44 +0200
Subject: [PATCH] main: keep fd handlers in list
Experimental code in order to try to solve
sockets for Windows. On windows the "int fd" is actually
of type "SOCKET fd" and the range goes from 0 to very large.
ref #61
@sreimers
sreimers / changelog_issues.sh
Last active December 22, 2020 16:26
Replace github changelog.md issue and pull request urls and print authors
sed -i 's" #\([0-9\]\+\)" [#\1](https://github.com/baresip/baresip/pull/\1)"g' CHANGELOG.md
git log v0.6.6...HEAD | grep Author | awk -F"<" '{ print $1 }' | cut -c 9- | sort | uniq
egrep -o "[#[0-9]+\]" CHANGELOG.md | sed 's"\[#\([0-9]\+\)\]"[#\1]: https://github.com/baresip/re/pull/\1"' | sort | uniq
curl -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/repos/baresip/re/compare/v1.1.0...HEAD\?per_page\=100 | jq -r '.commits[] | .author.login' | sort | uniq