Skip to content

Instantly share code, notes, and snippets.

@azmeuk
azmeuk / gist:8859316
Created February 7, 2014 08:56
Docker issue logs
$ sudo lxc-checkconfig
--- Namespaces ---
Namespaces: enabled
Utsname namespace: enabled
Ipc namespace: enabled
Pid namespace: required
User namespace: missing
Network namespace: enabled
Multiple /dev/pts instances: missing
@azmeuk
azmeuk / conquest-pacs.sh.patch
Last active August 29, 2015 13:57
conquest-pacs.sh.patch Patch
--- conquest-pacs.sh 2013-10-13 22:34:39.000000000 +0200
+++ conquest-pacs.sh 2014-03-24 15:05:48.397034507 +0100
@@ -84,7 +84,7 @@
--exec $DAEMON -- $ARGS
sleep 1
start-stop-daemon --start --quiet --pidfile $PIDFILE \
- --chuid conquest --chdir $HOME --exec $DAEMON -- $ARGS
+ --chuid $PACSUSER --chdir $HOME --exec $DAEMON -- $ARGS
echo "$NAME."
;;
@azmeuk
azmeuk / foobar.py
Created September 30, 2014 13:08
Python wait and print
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import time, sys
if __name__ == "__main__":
for i in range(0,4):
print i
time.sleep(1)
@azmeuk
azmeuk / parser.py
Last active August 29, 2015 14:07
General output parser
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import multiprocessing, subprocess, sys
class Parser(multiprocessing.Process):
process = None
def __init__(self, daemon, output):
super(Parser, self).__init__()
#
# Finds the closest virtualenv root directory, starting from $1, and going up to the root.
# If the target directory is not specified as an argument, current directory is used.
# Prints the virtualenv path found, or nothing otherwise.
#
function venv_find () {
# The cycle is just for the case with broken root folder detection -- never do more than N iterations.
venv_root=${1:-"."}
venv_found=""
@azmeuk
azmeuk / SDL EGL test
Last active December 16, 2015 21:48
This code returns :EGL KOGLX OK
#include <EGL/egl.h>
#include <GL/glx.h>
#include <SDL/SDL.h>
int main(){
SDL_InitSubSystem(SDL_INIT_VIDEO);
SDL_SetVideoMode(200, 200, 0, SDL_OPENGL);
printf(eglGetCurrentContext() == EGL_NO_CONTEXT ? "EGL KO\n" : "EGL OK\n");
printf(glXGetCurrentContext() == NULL ? "GLX KO\n" : "GLX OK\n");
@azmeuk
azmeuk / Denemo GUB buid fail
Last active December 26, 2015 05:19
Gub fails to build denemo
* Starting build: Tue Oct 22 14:31:18 2013
must rebuild: mingw::lilypondcairo
*** Checksum mismatch: diff (lilypondcairo, mingw)
--- /home/eloi/jjbenhamgub/target/mingw/packages/lilypondcairo.checksum 0000
+++ THIS BUILD Tue Oct 22 14:31:16 2013
@@ -1 +1,415 @@
@azmeuk
azmeuk / IOIO Console Dump
Created October 24, 2013 11:56
IOIO Console Dump
[D/IOIOConnectionRegistry] Successfully added bootstrap class: ioio.lib.pc.SerialPortIOIOConnectionBootstrap
[D/SerialPortIOIOConnectionBootstrap] Adding serial port /dev/IOIO0
[D/IOIOImpl] Waiting for IOIO connection
[V/IOIOImpl] Waiting for underlying connection
log: instantiating jtermios.linux.JTermiosImpl
log: < open('/dev/IOIO0',00000902) => 9
log: < close(9) => 0
log: < open('/dev/IOIO0',00000902) => 9
log: < fcntl(9, 3, 0) => 34818
log: < fcntl(9, 4, 32770) => 0
@azmeuk
azmeuk / gist:7371031
Created November 8, 2013 13:27
Xorg.0.log on Fedora 19 with AMD proprietary drivers, trying to make my Radeon HD 7470/8470 work.
[ 460.410]
X.Org X Server 1.14.3
Release Date: 2013-09-12
[ 460.415] X Protocol Version 11, Revision 0
[ 460.417] Build Operating System: 3.10.9-200.fc19.x86_64
[ 460.418] Current Operating System: Linux pc-eloi.cap-sciences.h20 3.11.7-200.fc19.x86_64 #1 SMP Mon Nov 4 14:09:03 UTC 2013 x86_64
[ 460.418] Kernel command line: BOOT_IMAGE=/vmlinuz-3.11.7-200.fc19.x86_64 root=/dev/mapper/fedora_pc--eloi-root ro rd.lvm.lv=fedora_pc-eloi/swap rd.md=0 rd.dm=0 vconsole.font=latarcyrheb-sun16 vconsole.keymap=fr rd.luks=0 rd.lvm.lv=fedora_pc-eloi/root rhgb quiet LANG=fr_FR.UTF-8 radeon.modeset=0 rd.driver.blacklist=radeon
[ 460.423] Build Date: 23 October 2013 06:12:49AM
[ 460.425] Build ID: xorg-x11-server 1.14.3-2.fc19
[ 460.426] Current version of pixman: 0.30.0
DEBUG selector_events:53 Using selector: EpollSelector
DEBUG callbacks:431 connecting <bound method PresenceManagedClient._handle_stream_established of <aioxmpp.node.PresenceManagedClient object at 0x7f52a4c94ba8>> with mode <bound method AdHocSignal.STRONG of <class 'aioxmpp.callbacks.AdHocSignal'>>
DEBUG callbacks:431 connecting <Future pending> with mode <bound method AdHocSignal.AUTO_FUTURE of <class 'aioxmpp.callbacks.AdHocSignal'>>
DEBUG callbacks:431 connecting <Future pending> with mode <bound method AdHocSignal.AUTO_FUTURE of <class 'aioxmpp.callbacks.AdHocSignal'>>
DEBUG callbacks:431 connecting <bound method AbstractClient._stream_failure of <aioxmpp.node.PresenceManagedClient object at 0x7f52a4c94ba8>> with mode <bound method AdHocSignal.STRONG of <class 'aioxmpp.callbacks.AdHocSignal'>>
DEBUG callbacks:431 connecting <bound method AbstractClient._stream_destroyed of <aioxmpp.node.PresenceManagedClient object at 0x7f52a4c94ba8>> with mode <bound method AdHocSignal.STRONG of <cla