This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* CH552G test program */ | |
#include <8052.h> | |
#include <stdint.h> | |
void delay( void ); | |
void main( void ) { | |
while( 1 ) { | |
P1_1 = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* CH552G test program */ | |
#include <8052.h> | |
#include <stdint.h> | |
void delay( void ); | |
void main( void ) { | |
while( 1 ) { | |
P1_1 = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@9247c038a790:~# cat xvfb.py | |
from selenium import webdriver | |
from xvfbwrapper import Xvfb | |
import unittest | |
class TestPages(unittest.TestCase): | |
def setUp(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:trusty | |
MAINTAINER Benjamin Henrion <[email protected]> | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |