-
Reset to factory defaults
reset config bootstrap reset config
-
Configure interfaces
This file contains 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
version: '3.3' | |
services: | |
ise-radius-auth: | |
image: alpine/socat | |
restart: always | |
# change 10.40.100.222 for your IP | |
command: UDP4-RECVFROM:1883,fork,reuseaddr UDP4-SENDTO:10.40.100.222:1812 | |
ports: | |
- 0.0.0.0:8812:1812 | |
logging: |
This file contains 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/bash | |
# Usage: bash loader.sh file.bin enp5s0 | |
USER=${USER} | |
IFNAME=$2 | |
/sbin/ip addr replace 192.168.99.10/24 dev $IFNAME | |
/sbin/ip link set dev $IFNAME up | |
/usr/sbin/dnsmasq --user=$USER \ | |
--no-daemon \ | |
--listen-address 192.168.99.10 \ |
This file contains 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
ADDR=$1 | |
USER=$2 | |
PASS=$3 | |
KEYS='-q -o ServerAliveInterval=2 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' | |
SSHPASS="sshpass -p $PASS ssh $KEYS $USER@$ADDR" | |
$SSHPASS cpeagent restart |
This file contains 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
#include "qcom-ipq4019.dtsi" | |
#include <dt-bindings/gpio/gpio.h> | |
#include <dt-bindings/input/input.h> | |
/ { | |
model = "Yuncore XD6800"; | |
compatible = "yuncore,xd6800", "qcom,ipq4019"; | |
soc { | |
mdio@90000 { |
This file contains 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
# Install additional pkgs via opkg | |
opkg update | |
# All possible modems pkgs | |
opkg install usb-modeswitch kmod-mii kmod-usb-net kmod-usb-net-cdc-ether kmod-usb-net-cdc-mbim kmod-usb-net-cdc-ncm kmod-usb-net-huawei-cdc-ncm kmod-usb-net-qmi-wwan kmod-usb-net-rndis kmod-usb-wdm kmod-usb-net-qmi-wwan kmod-usb-net-asix kmod-usb-net-asix-ax88179 kmod-usb-net-ipheth usbmuxd libimobiledevice uqmi wwan umbim comgt comgt-ncm usbreset | |
opkg install kmod-usb-ohci-pci kmod-usb2-pci kmod-usb-serial-option kmod-usb-serial kmod-usb-serial-wwan usbutils | |
# StrongSwan for IPSec - Control plane | |
opkg install strongswan-minimal | |
# SNMP daemon | |
opkg install mini_snmpd | |
# LUA libs |
This file contains 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
package rssi | |
import ( | |
"math" | |
) | |
const ( | |
// from wiki original formula: https://en.wikipedia.org/wiki/Free-space_path_loss | |
fsplConstant = 27.55 | |
) |
This file contains 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
package main | |
import ( | |
"encoding/json" | |
"errors" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"net/url" |
This file contains 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 always_background = true; | |
db.getCollectionNames().forEach(function(collection) { | |
indexes = db.getCollection(collection).getIndexes(); | |
if(indexes && indexes.length>0) { | |
print("//Indexes for " + collection + ":"); | |
indexes.forEach(function(index) { | |
var options = {}; | |
if(index.unique) { | |
options.unique = index.unique; | |
} |
This file contains 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
# One line JS code to check MongoDB collection storageSize | |
var collectionNames = db.getCollectionNames(), stats = []; collectionNames.forEach(function (n) { stats.push(db.getCollection(n).stats()); }); stats = stats.sort(function(a, b) { return b['storageSize'] - a['storageSize']; }); for (var c in stats) { print(stats[c]['ns'] + ": " + stats[c]['size'] + " (" + stats[c]['storageSize'] + ")"); } |
NewerOlder