Original by chriscook8 from esp8266.com I just modified to use ESP8266WebServer library for easy to handle the http request.
This is sample code not yet complete.
- when Wifi connected need to close the softAP.
| #!/bin/bash | |
| if [ "$4" == "" ]; then | |
| echo "usage: $0 <local_ip> <remote_ip> <new_local_ip> <new_remote_ip>" | |
| echo "creates an ipsec tunnel between two machines" | |
| exit 1 | |
| fi | |
| SRC="$1"; shift | |
| DST="$1"; shift |
| #define KBUILD_MODNAME "load_balancer" | |
| #include <uapi/linux/bpf.h> | |
| #include <linux/in.h> | |
| #include <linux/if_ether.h> | |
| #include <linux/if_packet.h> | |
| #include <linux/if_vlan.h> | |
| #include <linux/ip.h> | |
| #include <linux/ipv6.h> | |
| BPF_HASH(counter, uint32_t, long); |
| ##############Script Settings################## | |
| :local RemoteNOIPHost "domainname.noip.com" | |
| :local IPsecComment "myIPsec" | |
| ############################################### | |
| :local TmpIP [/ip ipsec peer get [find comment="$IPsecComment"] address] | |
| :local OldIP [:pick "$TmpIP" 0 ([:len $TmpIP] - 3)] | |
| :local NewIP [:resolve $RemoteNOIPHost] | |
| :if ($NewIP != $OldIP) do={ |
| ##############Script Settings################## | |
| :local DDNSUser "username" | |
| :local DDNSPass "password" | |
| :local DDNSDomain "yourhost.ddns.net" | |
| :local DDNSServer "https://members.dyndns.org/v3/update" | |
| :local WANInter "pppoe-out1" | |
| ############################################### | |
| :local IpCurrent [/ip address get [find interface=$WANInter] address]; | |
| :for i from=( [:len $IpCurrent] - 1) to=0 do={ |
| server { | |
| location ~* (serviceworker\.js)$ { | |
| add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; | |
| expires off; | |
| proxy_no_cache 1; | |
| } | |
| } |
| import React, { Component } from 'react'; | |
| import { BrowserRouter as Router, Route, Link } from "react-router-dom"; | |
| import { Layout, Menu, Icon } from 'antd'; | |
| import Dashboard from './containers/Dashboard/Dashboard'; | |
| import Meseros from './containers/Meseros/Meseros'; | |
| const { Header, Content, Footer, Sider } = Layout; | |
| const SubMenu = Menu.SubMenu; |
| import cv2 | |
| import numpy as np | |
| def deskew(im, max_skew=10): | |
| height, width = im.shape | |
| # Create a grayscale image and denoise it | |
| im_gs = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY) | |
| im_gs = cv2.fastNlMeansDenoising(im_gs, h=3) |
| import cv2 | |
| import numpy as np | |
| def deskew(im, max_skew=10): | |
| height, width = im.shape | |
| # Create a grayscale image and denoise it | |
| im_gs = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY) | |
| im_gs = cv2.fastNlMeansDenoising(im_gs, h=3) |
| server { | |
| listen 80 default_server; | |
| server_name example.com www.example.com; | |
| access_log /srv/www/example.com/logs/access.log; | |
| error_log /srv/www/example.com/logs/error.log; | |
| root /srv/www/example.com/public; | |
| index index.php index.html; |