Skip to content

Instantly share code, notes, and snippets.

View winks's full-sized avatar
🚮
Computers were a bad idea.

Florian Anderiasch winks

🚮
Computers were a bad idea.
View GitHub Profile
Compiling leiningen.core.classpath
Compiling leiningen.core.eval
Compiling leiningen.core.main
Compiling leiningen.core.project
Compiling leiningen.core.ssl
Verifying that +winks is my Bitcoin username. You can send me #bitcoin here: https://onename.io/winks

Hetzner Primary IPv4 IP + IPv4/2x Subnet + "Non-Routed" IPv6/64 Subnet HowTo

... so I do not forget the next time I have to figure this stuff out. And perhaps to help other poor souls fiddling with v6/v4 xen setups in a Hetzner network environment.

Basic setup

You can basically follow along the Xen Project Beginners Guide.

The short version

Install Debian Wheezy via Hetzner's installimage on the rescue system, the only important part about partitioning is that you have an LVM volume group named vg0 with enough space for your guests' disks.

@winks
winks / gfm_file.rb
Last active August 29, 2015 14:03
Render GitHub Flavored markdown to temp file and view it
#!/usr/bin/env ruby
exit unless ARGV.length > 0
require 'github/markdown'
require 'tempfile'
t=Tempfile.new('gfm_foo')
t.write(GitHub::Markdown.render_gfm(File.read(ARGV[0])))
t.rewind()
exec("/etc/alternatives/x-www-browser #{t.path}")
t.close()

Keybase proof

I hereby claim:

  • I am winks on github.
  • I am florian (https://keybase.io/florian) on keybase.
  • I have a public key whose fingerprint is 843D 52D7 2568 8EBA D9E4 D522 EC9A 0BB7 42E5 1D3D

To claim this, I am signing this object:

class components::openresty::build (
$version = '1.4.3.4',
$minor = 1
) {
$tmpdir = "/root"
$targetdir = "/opt"
$outputdir = "/vagrant"
$ident = "ngx_openresty-${version}"
$filename = "${ident}.tar.gz"
$service = 'openresty'
@winks
winks / 0_reuse_code.js
Created November 7, 2013 17:01
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
# Create a self-signed cert
openssl req -x509 -batch -nodes -newkey rsa:2048 -keyout lumberjack.key -out lumberjack.crt
# Run a server
openssl s_server -accept 3333 -cert lumberjack.crt -key lumberjack.key
# Run a client
#!/usr/bin/ruby
require 'webrick'
require 'json'
req = WEBrick::HTTPRequest.new(WEBrick::Config::HTTP)
req.parse(STDIN)
json_payload = JSON.parse(req.query['payload'])
branch = json_payload['ref'].split('/')[-1]
import Image, ImageFont, ImageDraw, sys
IMG_SIZE = (40, 16)
FONT_SIZE = 12
FONT_OFFSET= (2,2)
C_BLACK = (0, 0, 0)
C_WHITE = (255, 255, 255)
STRING = "fnord"