Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am alexandernilsson on github.
  • I am alxnlssn (https://keybase.io/alxnlssn) on keybase.
  • I have a public key ASBU4o1apDZBJro9Ec5CYKMnJK_kyW76mqeBBeMKUNWgoQo

To claim this, I am signing this object:

@alexandernilsson
alexandernilsson / docker.py
Created July 4, 2014 14:00
Hack to read exposed ports from container options in deimos
inner = inner_ports(image)
if inner == []:
log.info("no port exposed in image, looking for --expose")
for i, opt in enumerate(options):
if opt == "--expose":
log.info("found " + opt)
inner = [int(options[i+1])]
break
port_pairings = list(itertools.izip_longest(ports, inner))
@alexandernilsson
alexandernilsson / gist:6042080
Created July 19, 2013 20:23
nvidia-drivers-linux-3.10.patch.txt
diff -ur -X - NVIDIA-Linux-x86_64-319.17-no-compat32.orig/kernel/nv-i2c.c NVIDIA-Linux-x86_64-319.17-no-compat32/kernel/nv-i2c.c
--- NVIDIA-Linux-x86_64-319.17-no-compat32.orig/kernel/nv-i2c.c 2013-04-26 00:22:30.000000000 -0400
+++ NVIDIA-Linux-x86_64-319.17-no-compat32/kernel/nv-i2c.c 2013-05-13 05:20:55.571981365 -0400
@@ -311,8 +311,6 @@
BOOL NV_API_CALL nv_i2c_del_adapter(nv_state_t *nv, void *data)
{
struct i2c_adapter *pI2cAdapter = (struct i2c_adapter *)data;
- int osstatus = 0;
- BOOL wasReleased = FALSE;