Skip to content

Instantly share code, notes, and snippets.

View rfc1459's full-sized avatar
🏴‍☠️
ARRRRRRR

Matteo Panella rfc1459

🏴‍☠️
ARRRRRRR
View GitHub Profile
@rfc1459
rfc1459 / parse_test.go
Created February 3, 2013 10:21
gocheck sample
/*
* io/parse_test.go - Tests for Moebius parser
* Copyright (C) 2013 Matteo Panella <morpheus@azzurra.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@rfc1459
rfc1459 / network_test.go
Last active December 12, 2015 05:28
Tests for Moebius network I/O loop
/*
* network_test.go - network I/O testing
* Copyright (C) 2013 Matteo Panella <morpheus@azzurra.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@rfc1459
rfc1459 / server.ex
Created March 23, 2013 21:47
Stacker server example rewritten using GenX
defmodule Stacker.Server do
import GenX.GenServer
use GenServer.Behaviour
def start_link(stack) do
:gen_server.start_link({:local, Stacker.Server}, __MODULE__, stack, [])
end
def init(stack) do
{ :ok, stack }
package main
import (
"github.com/rfc1459/xmp"
"github.com/rfc1459/xmp/portal"
)
// Per-resonator attack
func perResAttack(p portal.Portal, x xmp.Xmp) (xmps int) {
orientation := portal.N
@rfc1459
rfc1459 / lspci.txt
Created April 16, 2013 10:06
lspci output for Dell XPS 13
$ lspci -tv
-[0000:00]-+-00.0 Intel Corporation Ivy Bridge DRAM Controller
+-02.0 Intel Corporation Ivy Bridge Graphics Controller
+-14.0 Intel Corporation Panther Point USB xHCI Host Controller
+-16.0 Intel Corporation Panther Point MEI Controller #1
+-1a.0 Intel Corporation Panther Point USB Enhanced Host Controller #2
+-1b.0 Intel Corporation Panther Point High Definition Audio Controller
+-1c.0-[01]----00.0 Intel Corporation Centrino Advanced-N 6235
+-1d.0 Intel Corporation Panther Point USB Enhanced Host Controller #1
+-1f.0 Intel Corporation Panther Point LPC Controller
@rfc1459
rfc1459 / rc.local
Created April 16, 2013 10:07
/etc/rc.local for Dell XPS 13 Developer Edition
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
@rfc1459
rfc1459 / wireless
Created April 16, 2013 10:08
/etc/pm/power.d/wireless for Dell XPS 13 Developer Edition
/sbin/iwconfig wlan0 power off
@rfc1459
rfc1459 / 20_custom-ehci_hcd
Created April 16, 2013 10:53
/etc/pm/sleep.d/20_custom-ehci_hcd for Dell XPS 13 Developer Edition
#!/bin/bash
# inspired by http://art.ubuntuforums.org/showpost...0&postcount=19
# ...and http://thecodecentral.com/2011/01/18...ot-working-bug
# tidied by tqzzaa :)
# fixed and reformatted by Matteo Panella (@rfc1459)
VERSION=1.2
DEV_LIST=/tmp/usb-dev-list
DRIVERS_DIR=/sys/bus/pci/drivers
DRIVERS="ehci xhci" # ehci_hcd, xhci_hcd
@rfc1459
rfc1459 / touchpad_settings.sh
Created April 16, 2013 10:57
Synclient reset script for Dell XPS 13 touchpad
#!/bin/sh
synclient 'TapButton2=2'
@rfc1459
rfc1459 / README.md
Last active March 12, 2019 14:19
Ubuntu 14.04 memory cgroup fixup for Docker

Fix memory cgroup configuration for lxc-docker on Ubuntu 14.04

Step 1: enable hierarchical memory management

Drop memory-cg.conf into /etc/init. The upstart job will ensure that the memory cgroup is configured with hierarchical stats tracking before systemd-logind and/or docker start creating cgroups.

(Yes, it's mostly a crude hack with an obscure way of syncing with cgroup-lite. That can't be helped, though)