Skip to content

Instantly share code, notes, and snippets.

View zoobab's full-sized 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
@zoobab
zoobab / ledblink_ch552.c
Created August 4, 2020 08:52 — forked from takamame0205/ledblink_ch552.c
LED Blink for CH552G
@zoobab
zoobab / ledblink_ch552.c
Created August 4, 2020 08:52 — forked from takamame0205/ledblink_ch552.c
LED Blink for CH552G
@zoobab
zoobab / hsbxl site docker
Created January 4, 2019 17:05
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
root@9247c038a790:~# cat xvfb.py
from selenium import webdriver
from xvfbwrapper import Xvfb
import unittest
class TestPages(unittest.TestCase):
def setUp(self):
<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;
'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 December 30, 2015 21:07
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
@zoobab
zoobab / CMakeLists.txt
Created December 14, 2015 09:16
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 December 14, 2015 08:49
android_toolchain.cmake
# 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)
# 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