Skip to content

Instantly share code, notes, and snippets.

View troglobit's full-sized avatar
🎯
Focusing

Joachim Wiberg troglobit

🎯
Focusing
View GitHub Profile
@troglobit
troglobit / inadyn.conf
Last active August 29, 2015 13:56
Example inadyn.conf in libConfuse format.
# Example inadyn.conf
syslog = true
period = 600
startup-delay = 30
forced-update = 604800
wildcard = false
bind = eth0
provider default@freedns.afraid.org
{
@troglobit
troglobit / inadyn.json
Created February 23, 2014 21:34
Example inadyn.conf in JSON format, using Jansson.
{
"syslog": true,
"period": 600,
"startup-delay": 30,
"forced-update": 604800,
"wildcard": true,
"bind": "eth0",
"system": [
{
"type": "default@freedns.afraid.org",
@troglobit
troglobit / finit.conf
Last active August 29, 2015 13:59
Example Finit single configuration file for Debian
# Sample Debian finit.conf
user admin
host testbed
# Devices to fsck at boot
check /dev/vda1
# Linux kernel modules to load
module button
module evdev
@troglobit
troglobit / keybase.md
Created April 16, 2015 04:09
Keybase

Keybase proof

I hereby claim:

  • I am troglobit on github.
  • I am troglobit (https://keybase.io/troglobit) on keybase.
  • I have a public key whose fingerprint is DE09 3183 2DBF 8339 191F B2B2 2C2A B0A9 6E0C 4758

To claim this, I am signing this object:

@troglobit
troglobit / gist:8227260
Last active January 2, 2016 00:59
Handlingslista

Handlingslista

  • Mjölk
  • Fil
  • Smör
  • Pasta
@troglobit
troglobit / Makefile
Created February 3, 2016 23:27 — forked from wkz/Makefile
flip:
@echo '\\/' | sed -e 's:\\/://\\:'
flip-adv:
@echo '\\/' | sed -e 's/\\\//\/\/\\/'
flip-evil:
@echo "\\\\\/" | sed -e "s/\\\\\\\\\//\/\/\\\/"
/* https://gist.github.com/gdamjan/9560411 */
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <sys/timerfd.h>
#include <time.h>
#include <unistd.h>
#define handle_error(msg) \
@troglobit
troglobit / svans.c
Last active October 17, 2018 16:14
tail in C, available under the ISC license
/*
* Copyright (c) 2018 Joachim Nilsson <troglobit@gmail.com>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
@troglobit
troglobit / igmp_join.c
Last active March 17, 2019 15:07
Linux: ASM join IPv4 multicast group
/* Linux and FreeBSD: ASM join IPv4 multicast group */
#include <err.h>
#include <unistd.h>
#include <stdio.h>
#include <arpa/inet.h>
#include <net/if.h>
#include <netinet/in.h>
int main(int argc, char *argv[])
{
@troglobit
troglobit / vegorecept.txt
Last active March 18, 2019 22:27
Jakobs fina vegorecept
23:01 <jakov> Båda är Jamie Oliver. Den med ärtor o linser är Daal nånting
23:01 <jakov> Den andra kallar Jamie för "Hearty Veg Curry"
23:02 <jakov> Om du tar med röd paprika så blir det kanske bättre, jag glömde köpa det :)
Ingredienser:
17:58 <jakov> 150g delade röda linser
17:58 <jakov> 150g delade gula ärtor
17:58 <jakov> 2 röd lök
17:58 <jakov> 6 klyftor vitlök
17:58 <jakov> 2 mogna tomater