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 / 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)

@rfc1459
rfc1459 / boxstarter.ps1
Last active November 5, 2017 19:15 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Original author: Jess Frazelle <jess@linux.com>
# Modified by: Matteo Panella <m.panella@level28.org>
# Last Updated: 2017-11-05
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
@rfc1459
rfc1459 / WEBIRC v2 Draft.md
Created May 12, 2011 20:42
WEBIRC Protocol Version 2 Draft
@rfc1459
rfc1459 / gnome-keyring-daemon
Created September 9, 2014 10:19
Stupid wrapper for gnome-keyring-daemon on MATE 1.8 and XFCE4
#!/usr/bin/env python
# Stupid workaround for a stupid problem: both MATE 1.8 and XFCE4 start
# gnome-keyring-daemon with *ALL* components enabled because gkd sets env
# vars through a GNOME-only DBus interface (org.gnome.SettingsDaemon.Setenv)
# This script wraps gkd and upon detection of the hardcoded command line
# replaces it with a saner one.
# Drop the script as "gnome-keyring-daemon" somewhere higher up in your PATH
# (possibly ~/bin or ~/.local/bin, depending on your profile)
@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 / 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 / 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 / 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 / wireless
Created April 16, 2013 10:08
/etc/pm/power.d/wireless for Dell XPS 13 Developer Edition
/sbin/iwconfig wlan0 power off
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