(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#!/bin/sh | |
# | |
# /etc/rc.d/init.d/supervisord | |
# | |
# Supervisor is a client/server system that | |
# allows its users to monitor and control a | |
# number of processes on UNIX-like operating | |
# systems. | |
# | |
# chkconfig: - 64 36 |
#include <stdio.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <net/if.h> | |
#include <net/ethernet.h> | |
#include <netinet/in.h> | |
#include <netinet/ip.h> | |
#include <arpa/inet.h> | |
#include <netpacket/packet.h> |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#!/bin/bash | |
# alias in gitconfig: | |
# cb = "!sh ~/.git-cb.sh" | |
# usage: | |
# git cb ev lo # *ev*lo* - `develop` will be matched | |
# cb = "!checkoutbranch() { local branches=`git branch | grep -i $1 | tr -d '* '`; if [[ `echo \"$branches\" | wc -l | tr -d ' '` != 1 ]]; then echo \"Matched multiple branches:\"; git branch | grep --color -i $1; exit 1; fi; git checkout $branches; }; checkoutbranch" | |
branches=`git branch` |
sed_replace() { | |
# require all 3 parameters | |
if [ .$1 = . ] || [ .$2 = . ] || [ .$3 = . ]; then | |
echo "Usage: sed_replace [oldString] [newString] [targetFile]" | |
return 0 | |
fi | |
local oldString=$1 | |
local newString=$2 | |
local targetFile=$3 | |
local temp=`mktemp -t sed_replace.XXXXXXXXX` |
git config --global https.proxy http://127.0.0.1:1080 | |
git config --global https.proxy https://127.0.0.1:1080 | |
git config --global --unset http.proxy | |
git config --global --unset https.proxy | |
npm config delete proxy |
This document is research for the selection of a communication platform for robot-net.
The purpose of this component is to enable rapid, reliable, and elegant communication between the various nodes of the network, including controllers, sensors, and actuators (robot drivers). It will act as the core of robot-net to create a standardized infrastructure for robot control.
Requirements:
// Run this in the F12 javascript console in chrome | |
// if a redirect happens, the page will pause | |
// this helps because chrome's network tab's | |
// "preserve log" seems to technically preserve the log | |
// but you can't actually LOOK at it... | |
// also the "replay xhr" feature does not work after reload | |
// even if you "preserve log". | |
window.addEventListener("beforeunload", function() { debugger; }, false) |
sudo yum install wget mercurial cmake openssl-devel c-ares-devel libuuid-devel | |
wget https://github.com/warmcat/libwebsockets/archive/v2.1.0.tar.gz | |
tar xf v2.1.0.tar.gz | |
cd libwebsockets-2.1.0 | |
mkdir build; cd build | |
cmake .. -DLIB_SUFFIX=64 | |
sudo make install | |
echo "/usr/local/lib64" | sudo tee -a /etc/ld.so.conf.d/libwebsockets.conf | |
sudo ldconfig | |
ldconfig -p | grep libwebsockets |
#!/usr/bin/env python3 | |
import socket | |
import struct | |
import traceback | |
import subprocess | |
import time | |
import signal | |
import dnslib |