Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
#! /usr/bin/env python2 | |
import cv2 | |
import numpy as np | |
colors = [] | |
def on_mouse_click (event, x, y, flags, frame): | |
if event == cv2.EVENT_LBUTTONUP: | |
colors.append(frame[y,x].tolist()) |
Windows Registry Editor Version 5.00 | |
[HKEY_CURRENT_USER\SOFTWARE\Classes\AtomicRedTeam.1.00] | |
@="AtomicRedTeam" | |
[HKEY_CURRENT_USER\SOFTWARE\Classes\AtomicRedTeam.1.00\CLSID] | |
@="{00000001-0000-0000-0000-0000FEEDACDC}" | |
[HKEY_CURRENT_USER\SOFTWARE\Classes\AtomicRedTeam] | |
@="AtomicRedTeam" | |
[HKEY_CURRENT_USER\SOFTWARE\Classes\AtomicRedTeam\CLSID] | |
@="{00000001-0000-0000-0000-0000FEEDACDC}" | |
[HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID\{00000001-0000-0000-0000-0000FEEDACDC}] |
///bin/true;COMPILER_OPTIONS="-g -Wall -Wextra --std=c99 -O1 -fsanitize=address,undefined";THIS_FILE="$(cd "$(dirname "$0")"; pwd -P)/$(basename "$0")";OUT_FILE="/tmp/build-cache/$THIS_FILE";mkdir -p "$(dirname "$OUT_FILE")";test "$THIS_FILE" -ot "$OUT_FILE" || $(which clang || which gcc) $COMPILER_OPTIONS -xc "$THIS_FILE" -o "$OUT_FILE" || exit;exec "$OUT_FILE" "$@" | |
#include <stdio.h> | |
int main() { | |
printf("Hello world!\n"); | |
return 0; | |
} |
#include <Arduino.h> | |
#include "gnss.h" | |
GNSS gps; | |
float GPS_SEARCH_TIMEOUT_S = 40; | |
extern uint8_t LED; | |
// volatile char GNSS_data[58] = ""; | |
char GNSS_data[58] = ""; | |
String gps_data = ""; |
{ | |
"id": 1, | |
"title": "VerneMQ", | |
"originalTitle": "VerneMQ", | |
"tags": [], | |
"style": "dark", | |
"timezone": "browser", | |
"editable": true, | |
"hideControls": false, | |
"sharedCrosshair": false, |
# Aliyun OpenVPN: https://help.aliyun.com/knowledge_detail/42521.html | |
# sudo bash update_source.sh // usa can't visit mirrors.aliyun.com | |
yum install -y lzo lzo-devel openssl openssl-devel pam pam-devel pkcs11-helper pkcs11-helper-devel | |
rpm -qa lzo lzo-devel openssl openssl-devel pam pam-devel pkcs11-helper pkcs11-helper-devel | |
wget http://oss.aliyuncs.com/aliyunecs/openvpn-2.2.2.tar.gz | |
yum install -y rpm-build gcc gcc-c++ | |
rpmbuild -tb openvpn-2.2.2.tar.gz | |
# rpm -ivh openvpn-2.2.2-1.x86_64.rpm | |
rpm -ivh ./rpmbuild/RPMS/x86_64/openvpn-2.2.2-1.x86_64.rpm | |
cd /usr/share/doc/openvpn-2.2.2/easy-rsa/2.0 |
local 192.168.2.0 # SWAP THIS NUMBER WITH YOUR RASPBERRY PI IP ADDRESS | |
dev tun | |
proto udp #Some people prefer to use tcp. Don't change it if you don't know. | |
port 1194 | |
ca /etc/openvpn/easy-rsa/keys/ca.crt | |
cert /etc/openvpn/easy-rsa/keys/Server.crt # SWAP WITH YOUR CRT NAME | |
key /etc/openvpn/easy-rsa/keys/Server.key # SWAP WITH YOUR KEY NAME | |
dh /etc/openvpn/easy-rsa/keys/dh1024.pem # If you changed to 2048, change that here! | |
server 10.8.0.0 255.255.255.0 | |
# server and remote endpoints |
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
#include <ESP8266WiFi.h> | |
#include <ESP8266WebServer.h> | |
const char* ssid = ".............."; | |
const char* password = "................"; | |
String form = "<form action='led'><input type='radio' name='state' value='1' checked>On<input type='radio' name='state' value='0'>Off<input type='submit' value='Submit'></form>"; | |
String imagepage = "<img src='/led.png'>"; |
/** | |
* A small demo of a dot bouncing inside a 128x64 OLED screen, using the Onion Omega 2. Note this isn't using the | |
* OLED expansion, but a cheapo screen I bought from China, using the SSD1306 (as far as I could tell) driver. | |
* This was only a personal exercise to see how easy it is to setup, it might be handly to someone else learning! | |
* | |
* To compile: | |
* - install gcc and make (See: https://docs.onion.io/omega2-docs/c-compiler-on-omega.html) | |
* - install git (Follow this: https://docs.onion.io/omega2-docs/installing-and-using-git.html) | |
* - install python-dev | |
* - git clone the i2c exp driver (https://github.com/OnionIoT/i2c-exp-driver) |