Skip to content

Instantly share code, notes, and snippets.

@hukl
hukl / erlang_ideas.md
Created June 12, 2012 10:10
Erlang Eco System Ideas
  • implement input agnostic type conversion functions e.g. to_integer, to_list, to_binary
  • helper functions that make it super easy to create supervisor childspecs
  • add a metric ton of support functions to traverse, merge, filter, search (,…) proplists, dicts, orddicts etc.
  • build a decent json support lib - the way you have to work with jiffy for example is painful
  • configuration and environment management
@hukl
hukl / preflight.md
Created July 3, 2012 12:38
Preflight

Features

web interface to create checklist templates for given tasks like new release/deployment

  • template has groups of checks e.g. localization, frontend, backend, payment, virality related
  • you can start a checklist session from a template which can be shared with a url among coworkers
  • a session is a full copy of the given template i.e. changing a template does not change previous sessions
  • the progress of a checklist session is persisted
  • the progress is shown for each group and the whole checklist
  • the progress is updated for all participants of the session via SSE / Ajax Foo
  • the users authenticate via oauth (wooga.google.com)
@hukl
hukl / gist:6020656
Last active December 19, 2015 21:29
___________________________
/| /| | |
||__|| | Please don't |
/ O O\__ feed |
/ \ the trolls |
/ \ \ |
/ _ \ \ ----------------------
/ |\____\ \ ||
/ | | | |\____/ ||
/ \|_|_|/ | __||
# ZSH Script to open a tmux session for every host passed as CLI argument and synchronizes all the panes.
# Invoke with: ./cluster.zsh user@host1 user@host2 user@host3
#!/bin/zsh
while (( $# != 0 )) {
tmux splitw "ssh $1"
tmux select-layout tiled
shift
}
#!/bin/sh
#
# BEFORE: DAEMON
# PROVIDE: ezjail.example.config
#
# ezjail flavour example
. /etc/rc.subr
name=ezjail.flavour.bijail
<!DOCTYPE html>
<html>
<head>
<title>foo</title>
<style>
div#wrapper {
width: 800px;
height: 200px;
background-color: gray;
@hukl
hukl / ruby.sh
Created May 9, 2014 21:05
example rc script
#!/bin/sh
# PROVIDE: request_counter
# REQUIRE: LOGIN
# KEYWORD: shutdown
. /etc/rc.subr
name=request_counter
rcvar=request_counter_enable
@hukl
hukl / gist:40c12883cf25d5d8a1ed
Created November 27, 2014 12:59
FreeBSD.conf
FreeBSD: {
url: "pkg+http://pkg.eu.FreeBSD.org/${ABI}/latest",
mirror_type: "srv",
enabled: yes
}
-module().
-behavior(gen_server).
% Managment API
-export([start/0, start_link/0, stop/0]).
% gen_server callbacks
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2,
code_change/3]).
@hukl
hukl / truth_example.rb
Last active December 16, 2015 13:06
Blog post example for truth tables
# defining some constants
ARCHIVE_REQUESTED = 1 # binary 01
ARCHIVE_NOT_REQUESTED = 0 # binary 00
FINISHED_PROCESSING = 2 # binary 10
NOT_FINISHED_PROCESSING = 0 # binary 00
NOOP = 0 # binary 00
START = 1 # binary 01
BROKEN = 2 # binary 10