Skip to content

Instantly share code, notes, and snippets.

View lopter's full-sized avatar

Louis Opter lopter

View GitHub Profile
@lopter
lopter / README.md
Created January 18, 2022 03:04
Nix cross-compile trials
% nix-build --arg system '"raspberryPi"' ~/snippets/redshift.nix 
this derivation will be built:
  /nix/store/qv5qd82v3dp7zy19bbprf4b5mz3qf14h-redshift-armv6l-unknown-linux-gnueabihf-1.12.drv
building '/nix/store/qv5qd82v3dp7zy19bbprf4b5mz3qf14h-redshift-armv6l-unknown-linux-gnueabihf-1.12.drv'...
unpacking sources
unpacking source archive /nix/store/dpx45gfjiqayfgx0qzld94acaid3n1rc-source
source root is source
patching sources
updateAutotoolsGnuConfigScriptsPhase
@lopter
lopter / louis_lmain.kll
Last active May 15, 2020 22:41
The base layer for my Ergodox
# This layers on top of Scan/Infinity_Ergodox/{left,right}Hand.kll
Name = "Louis Ergodox Left Hand";
Version = 0.3;
Author = "Louis Opter";
Date = "2020-04-05";
# Left Hand Top Row
U"Esc" : U"Minus";
U"5" : U"5";
@lopter
lopter / realpath.c
Last active December 13, 2016 23:43
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int
main(int argc, char *argv[])
{
if (argc != 2) {
fprintf(stderr, "Usage: %s path\n", argv[0]);
@lopter
lopter / dmesg.log
Created April 24, 2013 01:54
Linux 3.2.0.40 crashes with Docker on Ubuntu 12.04
[ 1561.231044] BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
[ 1561.231186] IP: [<ffffffff81191d91>] d_hash_and_lookup+0x71/0x90
[ 1561.231257] PGD 2f30d067 PUD 29aed067 PMD 0
[ 1561.231323] Oops: 0000 [#1] SMP
[ 1561.231379] CPU 0
[ 1561.231431] Modules linked in: veth aufs xt_addrtype ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 ip_tables x_tables bridge stp vesafb ppdev psmouse serio_raw joydev parport_pc vboxguest(O) mac_hid i2c_piix4 lp parport usbhid hid e1000
[ 1561.231690]
[ 1561.231736] Pid: 4542, comm: apt-get Tainted: G W O 3.2.0-40-generic #64-Ubuntu innotek GmbH VirtualBox/VirtualBox
[ 1561.231848] RIP: 0010:[<ffffffff81191d91>] [<ffffffff81191d91>] d_hash_and_lookup+0x71/0x90
[ 1561.231954] RSP: 0018:ffff88002aabfcc8 EFLAGS: 00010202
diff --git a/zerorpc/context.py b/zerorpc/context.py
index 8d8f5f0..f489509 100644
--- a/zerorpc/context.py
+++ b/zerorpc/context.py
@@ -32,15 +32,6 @@ import gevent_zmq as zmq
class Context(zmq.Context):
_instance = None
- # Since pyzmq 13.0.0 implicit assignation is forbidden. Thankfully we are
- # allowed to define our attributes here, and initialize them per instance
@lopter
lopter / builder
Created March 14, 2012 14:43
Run Play 1.2.x on dotCloud's custom service
#!/bin/sh
rsync -aH --delete --exclude "data" * ~/code/
ln -sf ~/code/$SERVICE_APPROOT ~/current
cat > ~/run << 'EOF'
#!/bin/sh
cd /home/dotcloud/current
@lopter
lopter / app.php.inc
Created December 12, 2011 15:44
DotCloud public directory with PHP
<?php
define('APP_NAME', 'Hello world');