Skip to content

Instantly share code, notes, and snippets.

View tyriis's full-sized avatar
🏡
Working from home

Nils Müller tyriis

🏡
Working from home
View GitHub Profile
@tyriis
tyriis / proxy
Created November 23, 2017 22:03 — forked from boneskull/proxy
example nginx config to reverse proxy a node-red server (websocket support)
server {
listen 80;
server_name your_server_name;
access_log /var/log/nginx/access.log;
location / {
proxy_pass http://localhost:1880;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
@tyriis
tyriis / proxy
Created November 23, 2017 22:03 — forked from boneskull/proxy
example nginx config to reverse proxy a node-red server (websocket support)
server {
listen 80;
server_name your_server_name;
access_log /var/log/nginx/access.log;
location / {
proxy_pass http://localhost:1880;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
@tyriis
tyriis / configure
Last active November 21, 2017 11:43
nginx configure
./configure \
--prefix=/etc/nginx \
--sbin-path=/usr/sbin/nginx \
--conf-path=/data/nginx/nginx.conf \
--error-log-path=/data/nginx/log/error.log \
--http-log-path=/data/nginx/log/access.log \
--pid-path=/var/run/nginx.pid \
--lock-path=/var/run/nginx.lock \
--http-client-body-temp-path=/data/nginx/cache/client_temp \
--http-proxy-temp-path=/data/nginx/cache/proxy_temp \
@tyriis
tyriis / init.lua
Created August 30, 2016 07:07 — forked from creationix/init.lua
Websocket server in nodemcu using new crypto module.
wifi.setmode(wifi.STATION)
wifi.sta.config("creationix","noderocks")
wifi.sta.connect()
tmr.alarm(0, 1000, 1, function ()
local ip = wifi.sta.getip()
if ip then
tmr.stop(0)
print(ip)
dofile("websocket.lc")
dofile("main.lc")
function log(value)
if( DEFAULT_CHAT_FRAME ) then
DEFAULT_CHAT_FRAME:AddMessage(value);
end
end
function debug(value, indent, returnResult)
local linePrefix = "- "
local typeValue = type(value)