Skip to content

Instantly share code, notes, and snippets.

Avatar
🖕
No Software Patents, fuck the EPO and the USPTO

Benjamin Henrion zoobab

🖕
No Software Patents, fuck the EPO and the USPTO
View GitHub Profile
View ledblink_ch552.c
View ledblink_ch552.c
View hsbxl site docker
$ cat Dockerfile
FROM rprakashg/hugo-docker
RUN mkdir -p /var/www/blog
COPY . /var/www/blog
WORKDIR /var/www/blog
RUN hugo
$ docker build .
Sending build context to Docker daemon 110.5MB
Step 1/5 : FROM rprakashg/hugo-docker
View xvfbwrapper selenium
root@9247c038a790:~# cat xvfb.py
from selenium import webdriver
from xvfbwrapper import Xvfb
import unittest
class TestPages(unittest.TestCase):
def setUp(self):
View index.html
<h1>Hello World!</h1>
<script>
var remote = require('electron').remote;
// show initial value from main process (in dev console)
console.log(remote.getGlobal('sharedObj').prop1);
// change value of global prop1
var zyrename = remote.getGlobal('sharedObj').prop1;
View main.js
'use strict';
const electron = require ('electron');
const app = electron.app;
const BrowserWindow = electron.BrowserWindow;
var mainWindow = null;
var zyre = null;
var ipcMain = require('electron').ipcMain;
@zoobab
zoobab / malamute main Dockerfile
Created Dec 30, 2015
malamute main Dockerfile
View malamute main Dockerfile
FROM ubuntu:trusty
MAINTAINER Benjamin Henrion <zoobab@gmail.com>
RUN DEBIAN_FRONTEND=noninteractive apt-get update -y -q
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q --force-yes uuid-dev build-essential git-core libtool autotools-dev autoconf automake pkg-config unzip libkrb5-dev cmake
RUN useradd -d /home/zmq -m -s /bin/bash zmq
RUN echo "zmq ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/zmq
RUN chmod 0440 /etc/sudoers.d/zmq
View CMakeLists.txt
# I have added some debug messages status to expose variables used by cmake
cmake_minimum_required (VERSION 2.8)
project (czmqjni CXX)
enable_language (C)
include_directories (${JAVA_INCLUDE_PATH} /etc/java-config-2/current-system-vm/include/linux src/native/include)
find_library (ZMQ_LIBRARY NAMES zmq libzmq REQUIRED)
find_library (CZMQ_LIBRARY NAMES czmq REQUIRED)
@zoobab
zoobab / gist:092b109ccd066ce8bfae
Created Dec 14, 2015
android_toolchain.cmake
View gist:092b109ccd066ce8bfae
# copy me to czmq/bindings/jni/android_toolchain.cmake
set(CMAKE_SYSTEM_NAME Linux) # Tell CMake we're cross-compiling
set(ANDROID_NDK /opt/android-ndk)
include(CMakeForceCompiler)
# Prefix detection only works with compiler id "GNU"
# CMake will look for prefixed g++, cpp, ld, etc. automatically
CMAKE_FORCE_C_COMPILER(arm-linux-androideabi-gcc GNU)
set(ANDROID True)
set(BUILD_ANDROID True)
include_directories (../.././builds/qt-android/prefix/arm-linux-androideabi-4.9/include /opt/android-ndk/platforms/android-8/arch-arm/usr/include ../../include)
View buildme.sh
# copy me in czmq/bindings/jni/buidlme.sh and make me executable with chmod +x
#!/bin/bash
rm -Rf build
mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=../android_toolchain.cmake ..
ln -s /opt/android-ndk/platforms/android-8/arch-arm/usr/lib/crtend_so.o
ln -s /opt/android-ndk/platforms/android-8/arch-arm/usr/lib/crtbegin_so.o
make VERBOSE=1