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 / 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 / gist:7a68e021d39b6f40e8df
Created November 7, 2015 22:22
nvidia-docker test
$ docker build -t device_query samples/deviceQuery
Sending build context to Docker daemon 2.048 kB
Step 1 : FROM cuda:latest
---> 24b36fe1abbc
Step 2 : WORKDIR /usr/local/cuda/samples/1_Utilities/deviceQuery
---> Running in f8c0bfb5333e
---> 9951d503fd02
Removing intermediate container f8c0bfb5333e
Step 3 : RUN make
---> Running in 974ed5a27cda
@rfc1459
rfc1459 / mate.patch
Created April 14, 2015 19:22
Patch for xdg-utils/MATE 1.8 on Ubuntu Trusty
Description: Let xdg-utils know about MATE 1.8
Author: Matteo Panella <morpheus@level28.org>
Bug-Ubuntu: https://launchpad.net/bugs/1001902
--- a/scripts/xdg-open
+++ b/scripts/xdg-open
@@ -308,6 +308,8 @@ detectDE()
elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;
elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
elif [ x"$DESKTOP_SESSION" = x"LXDE" ]; then DE=lxde;
@rfc1459
rfc1459 / keybase.md
Created December 12, 2014 23:24
keybase.md

Keybase proof

I hereby claim:

  • I am rfc1459 on github.
  • I am rfc1459 (https://keybase.io/rfc1459) on keybase.
  • I have a public key whose fingerprint is 1554 736D B705 CA86 A833 4C1F BDD0 3B54 E3CE 1BBE

To claim this, I am signing this object:

@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 / 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 / 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 / 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 / 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.