...
User.init(
{
username: { type: DataTypes.STRING, primaryKey: true },
password: { ...def },
fio: { ...def },
},
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Gun = require('gun'); | |
| const gun = Gun("http://localhost:8888/gun"); | |
| gun.get("switches").map().on(function(v, name) { | |
| console.log(name, v.status, v.power || "ON", v.temp || "?"); | |
| }) | |
| var mqtt = require('mqtt') | |
| var client = mqtt.connect('mqtt://localhost', { | |
| username: "sonoff", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useState, useEffect } from "react"; | |
| import * as io from "socket.io-client"; | |
| const socket = io(); | |
| function Auth() { | |
| const [auth, setAuth] = useState(false); | |
| const [username, setUsername] = useState(""); | |
| const [password, setPassword] = useState(""); | |
| const [name, setName] = useState(""); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| app.use((r, rs, n) => { | |
| rs.setHeader("Access-Control-Allow-Origin", "*") | |
| rs.setHeader("Content-Type", "application/json") | |
| rs.setHeader("Access-Control-Allow-Methods", "GET,PUT,POST,DELETE") | |
| rs.setHeader("Access-Control-Allow-Headers", "Content-Type") | |
| n(); | |
| }) | |
| ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| vlc --video-wallpaper --zoom 2 --no-osd <url> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| if [ -z ${1} ] | |
| then | |
| echo "Set shell script." | |
| else | |
| trap 'kill $(jobs -p);logger exit;exit' SIGINT SIGTERM EXIT | |
| for i in `seq 1 50000` | |
| do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| #docker rm -f $(docker ps -a -q) | |
| for I in $(seq 1 50) | |
| do | |
| docker run --name nginx$I -p 90$I:80 -d nginx & | |
| pids[${i}]=$! | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| <repositories> | |
| <repository> | |
| <id>ssh-repository</id> | |
| <url>scp://192.168.1.1/maven</url> | |
| </repository> | |
| </repositories> | |
| <build> | |
| <extensions> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # opkg install iptables-mod-lua | |
| iptables -A INPUT -j LUA --script ./script.lua |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 10 last log messages | |
| ubus -v call log read '{"lines":10,"stream":false,"oneshot":true}' | |
| # boardinfo | |
| ubus call system board | |
| # system stat | |
| ubus call system info |
OlderNewer