username: pi
password: raspberry
Need to add US support in addition to default GB, including language, keyboard, etc.
$ raspi-config
# Sticky session module for nginx | |
# https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/ | |
# nginx configure command: ./configure --with-http_ssl_module --add-module=../nginx-sticky-module-ng/ --sbin-path=/usr/local/sbin --with-http_gzip_static_module | |
upstream vida_node_server { | |
sticky path=/; | |
server 127.0.0.1:3000 max_fails=3 fail_timeout=30s; | |
server [server2]:3000 max_fails=3 fail_timeout=30s; | |
} |
#include <discovery_msgs/beacon.capnp.h> | |
#include <zmq.h> | |
#include <assert.h> | |
#include <capnp/message.h> | |
#include <capnp/serialize-packed.h> | |
#include <iostream> | |
/** |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# @file gevent_zmq_redis_demo.py | |
# @author kaka_ace <[email protected]> | |
# @date Tue Oct 14 2014 | |
""" | |
fetures: there are two concurrent tasks | |
1. From Redis server, Getting the notify msg with BLPOP operation, |
"""UDP proxy server.""" | |
import asyncio | |
class ProxyDatagramProtocol(asyncio.DatagramProtocol): | |
def __init__(self, remote_address): | |
self.remote_address = remote_address | |
self.remotes = {} |
#!/usr/bin/bash | |
# Download zeromq | |
# Ref http://zeromq.org/intro:get-the-software | |
wget https://github.com/zeromq/libzmq/releases/download/v4.2.2/zeromq-4.2.2.tar.gz | |
# Unpack tarball package | |
tar xvzf zeromq-4.2.2.tar.gz | |
# Install dependency |
import gevent | |
from gevent import monkey; monkey.patch_all() | |
from gevent_zeromq import zmq | |
import simplejson as json | |
import threading | |
import time | |
def server(context): | |
poll = zmq.Poller() |
// Implement a Graph | |
// basic operations: | |
// - add vertex (node) | |
// - add edge (node -> node) | |
function GraphNode(val) { | |
this.val = val; | |
this.edges = {}; | |
} |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |