Skip to content

Instantly share code, notes, and snippets.

View quixoten's full-sized avatar

Devin Christensen quixoten

View GitHub Profile

Keybase proof

I hereby claim:

  • I am quixoten on github.
  • I am quixoten (https://keybase.io/quixoten) on keybase.
  • I have a public key ASCMifCUc7vWAIOHr6HOv5kinB1paMz3sQQBLa2TyJyu8Ao

To claim this, I am signing this object:

@quixoten
quixoten / systemd_networkd.md
Last active August 11, 2017 17:22
Systemd Networkd Problem

Working Example

nat0.network file only, nat0.netdev is absent

 ~  cat /etc/systemd/network/nat0.network 
[Match]
Name=nat0

[Network]
module Protobuf
module Rpc
class LogSubscriber < ::ActiveSupport::Subscriber
include ::Protobuf::Logging
TIMING_FORMAT = '%s: %.1fms'.freeze
RECEIVED_FORMAT = '[%s] Received %s#%s from %s'.freeze
COMPLETED_FORMAT = '[%s] Completed in %.1fms (%s)'.freeze
def decode_request(event)
@quixoten
quixoten / scan_processors.rb
Last active December 20, 2015 03:29
An example ZMQ architecture for distributing work.
require 'rubygems'
require 'ffi-rzmq'
NUMBER_OF_CLIENTS = 10
NUMBER_OF_SCAN_PROCESSORS = 3
def client(identity)
context = ZMQ::Context.new
socket = context.socket ZMQ::REQ
socket.identity = identity
@quixoten
quixoten / gist:2918953
Last active October 6, 2015 02:18
Print a list of all thumbed up tracks from a "Station details" page on Pandora.
/*
* 1. Copy the code below
* 2. Go to a Station details page using the Chrome browser, e.g., http://www.pandora.com/station/223075254154832821
* 3. CTRL+SHIFT+J
* 4. CTRL+V
* 5. ENTER
*
* It could take a while depending on how many tracks you've thumbed up
**/