Skip to content

Instantly share code, notes, and snippets.

@alexellis
alexellis / k8s-pi.md
Last active April 11, 2024 14:17
K8s on Raspbian
@dmtucker
dmtucker / ipv6-erl.md
Last active April 13, 2024 15:58
Configuring IPv6 on EdgeRouter Lite

Configuring IPv6 on EdgeRouter Lite

Tested with:

  • v1.9.7+hotfix.4, Wave G in Seattle
  • v1.10.5, Comcast in the South Bay Area
set interfaces ethernet eth0 description LAN
set interfaces ethernet eth1 description WAN
set interfaces ethernet eth2 description WLAN
@geoffgarside
geoffgarside / graylog2-server
Created June 18, 2014 07:25
Graylog2 0.20 Service Scripts for FreeBSD
#!/bin/sh
#
# PROVIDE: graylog2_server
# REQUIRE: NETWORKING SERVERS
# BEFORE: DAEMON
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf to enable graylog2_server:
#
# graylog2_server_enable="YES"
@geoffgarside
geoffgarside / unbound-stats.rb
Created June 9, 2014 07:51
Unbound Control Stats Collector
#!/usr/bin/env ruby
#
# Unbound Stats Collector
# sends unbound-control stats output to a batsd/statsd server
#
#
# source 'https://rubygems.org'
# gem 'statsd-ruby'
#
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active July 4, 2024 23:40
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@kevinburke
kevinburke / haproxy.config
Created October 10, 2013 17:34
twilio haproxy config
# Twilio HTTP HAProxy Configuration
# Version: 0.1
global
daemon
log 127.0.0.1 local0 info
maxconn 60000
spread-checks 3
@ewencp
ewencp / html_email_preview.js
Last active May 13, 2019 22:09
Quick Javascript hack to preview HTML emails, extracting the HTML portion from a raw email message and stripping it similarly to email clients to preview how it will likely look to the recipient.
(function() {
/* First try to handle pages which are actually raw text of the email.
Extract the HTML part and replace page with it */
var orig_html = document.getElementsByTagName('html')[0].textContent;
var extracted_html = orig_html;
/* Try splitting it up if it's actually the multipart email. Otherwise, work
on the document itself, leaving the orig_html in place */
var boundary_pattern = '--===============';
while (extracted_html.indexOf(boundary_pattern) != -1) {
var next_boundary = extracted_html.indexOf(boundary_pattern);
@geoffgarside
geoffgarside / rails4-ember-template.rb
Created July 20, 2013 18:07
Rails 4 Ember Application Template
# Rails 4 Ember Application Template
# vim: set sts=2 sw=2 et:
# Remove normal files we don't want
remove_file "README.rdoc"
remove_file "public/index.html"
remove_file "app/assets/images/rails.png"
# Copy database.yml to sample
inside "config" do
run "cp database.yml database.yml.sample"
@geoffgarside
geoffgarside / rails4-template.rb
Last active June 26, 2022 21:27
Rails 4 Application Template
# Rails 4 Application Template
# Remove normal files we don't want
remove_file "README.rdoc"
remove_file "public/index.html"
remove_file "app/assets/images/rails.png"
# Copy database.yml and secrets.yml to sample
inside "config" do
run "cp database.yml database.yml.sample"
run "cp secrets.yml secrets.yml.sample"
@hintjens
hintjens / zcurve-poc.c
Last active May 23, 2016 00:41
zcurve -- CurveCP over ZeroMQ -- proof of concept
// Proof of concept CurveCP handshake over 0MQ.
//
// Demonstrates a confidential, authenticated connection between
// two 0MQ peers (two DEALER sockets in this example). See the
// curvecp.org website for details of the security design.
//
// This is a flat walk-through in code with minimal abstraction.
// The next version of this code will be more packaged.
//
// IMPORTANT NOTE: this code has not been reviewed by security experts