openssl genrsa -des3 -out myCA.key 2048openssl req -x509 -new -nodes -key myCA.key -sha256 -days 1825 -out myCA.pem| 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) |
| 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") |
| ./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 \ |
| 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; |
| 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; |
| #!/bin/sh | |
| # | |
| # !!! IMPORTANT !!! | |
| # As of 2017-12-14, pacaur is unmaintained (https://bbs.archlinux.org/viewtopic.php?pid=1755144#p1755144) | |
| # For alternatives see the arch wiki: https://wiki.archlinux.org/index.php/AUR_helpers#Active | |
| # pacaur seems to get occasional updates to fix breaking changes due to pacman updates though. | |
| # | |
| # If you are new to arch, I encourage you to at least read and understand what | |
| # this script does befor blindley running it. | |
| # That's why I didn't make a one-liner out of it so you have an easier time |
| -- source: https://medium.com/coding-blocks/creating-user-database-and-adding-access-on-postgresql-8bfcd2f4a91e | |
| CREATE DATABASE yourdbname; | |
| CREATE USER youruser WITH ENCRYPTED PASSWORD 'yourpass'; | |
| GRANT ALL PRIVILEGES ON DATABASE yourdbname TO youruser; |
| package dslab.DMTP; | |
| import dslab.entities.Message; | |
| import dslab.entities.User; | |
| import java.io.*; | |
| import java.lang.reflect.InvocationTargetException; | |
| import java.lang.reflect.Method; | |
| import java.net.Socket; | |
| import java.util.ArrayList; |