Skip to content

Instantly share code, notes, and snippets.

@juniorz
juniorz / import.rb
Created January 5, 2012 10:15 — forked from ngauthier/import.rb
Import a blogger archive to jekyll (octopress version)
require 'rubygems'
require 'nokogiri'
require 'fileutils'
require 'date'
require 'uri'
# usage: ruby import.rb my-blog.xml
# my-blog.xml is a file from Settings -> Basic -> Export in blogger.
data = File.read ARGV[0]
@juniorz
juniorz / TAILSCALE-ROUTER.md
Last active December 5, 2025 12:54
How to configure a Tailscale router
@juniorz
juniorz / HTTP.md
Last active November 15, 2024 13:00
Tools of trade

Keep-Alive

time telnet www-org.example.com 80

GET / HTTP/1.1
Host: www-org.example.com
Connection: keep-alive

(wait)
@juniorz
juniorz / install_postgis_osx.sh
Created July 14, 2011 03:49
Installing PostGIS on Mac OS X and Ubuntu
# Some good references are:
# http://russbrooks.com/2010/11/25/install-postgresql-9-on-os-x
# http://www.paolocorti.net/2008/01/30/installing-postgis-on-ubuntu/
# http://postgis.refractions.net/documentation/manual-1.5/ch02.html#id2630392
#1. Install PostgreSQL postgis and postgres
brew install postgis
initdb /usr/local/var/postgres
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
@juniorz
juniorz / README.md
Last active September 23, 2023 12:54
sysdig sample capture file

Test file generated for sysdig homebrew formula

This is how it was generated

$ mkdir -p /tmp/sysdig && cd /tmp/sysdig
$ sudo sysdig -w sample.scap evt.type=open and fd.name contains /tmp/sysdig

The test performed should be

$ sudo sysdig -r sample.scap evt.type=open fd.name contains /tmp/sysdig/sample.scap

@juniorz
juniorz / platform-engineering.md
Last active June 21, 2023 11:07
The jungle I live in

"Those that know, do. Those that understand, teach."

Aristoteles (supposedly)

Scope: Building and running web-scale distributed cloud systems with container technologies :P

Learning goals

  • Establish the challenges for engineering cloud-native systems (the problem space).
  • Establish the approaches to address those challenges (the solution space).

Software development hard truths

  • Dead Space development struggling to integrate changes from multiple teams/experts: https://youtu.be/BQ3iqq49Ew8?t=655
  • Desktop apps: once in a while you kill a process eating all you RAM. Web apps: once in a while you kill the Google Chrome GPU task eating all your RAM after you open a GIF.
  • Today's browser wars: migrating a customer's 100s open tab from Chrome to Firefox/Edge/Opera/Safari.
  • Why it is important to make experimention cheap.
  • The origin of Control Plane vs Data Plane and how the concept influenced UNIX design
@juniorz
juniorz / dns.go
Last active June 14, 2022 14:50
XMPP SRV dns over Tor
package xmpp
import (
"errors"
"fmt"
"log"
"net"
"net/url"
"github.com/miekg/dns"