Skip to content

Instantly share code, notes, and snippets.

Avatar

Jethro Carr jethrocarr

View GitHub Profile
View 3g_failover_launcher.sh
#!/bin/bash -x
#
# Local startup customisations. Everything logs to syslog
#
(
exec 1> >(logger -s -t rc-local) 2>&1
# Remove the eth0 default route
/sbin/route del default eth0
@jethrocarr
jethrocarr / gist:c56cecbf111af8c29791f89a2c30b978
Last active Jul 30, 2017
Tiny HTTP server to respond OK on port 9000 - handy for health checks on embedded boxes!
View gist:c56cecbf111af8c29791f89a2c30b978
/**
* Based on http://tinyhack.com/2014/03/12/implementing-a-web-server-in-a-single-printf-call/
*/
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<unistd.h>
#include<sys/types.h>
#include<sys/stat.h>
You can’t perform that action at this time.