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
#!/usr/bin/env bash | |
set -e | |
TMPDIR=$(mktemp -d) | |
PCRS=0,2,3,7 | |
# Chosen randomly, can be 0x81000000, or 0x81000001, etc | |
PERSISTENT_HANDLE=0x81010020 | |
cleanup() { |
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
#!/usr/bin/env bash | |
set -e | |
LIST="$(grep inotify /proc/"$1"/fdinfo/* | \ | |
awk '{print $3,$4}' | \ | |
sed -r 's/ino:([^ ]+) sdev:(.{2})(.*)/\1 \2 \3/' | \ | |
while read -r inode devmajor devminor; do | |
dec_inode=$((16#$inode)) | |
dec_devmajor=$((16#$devmajor)) |
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
0. Don't have a SIM card in when you're updating radio firmware or it will bomb out partway through as it changes from internal IP to IP passthrough | |
1. Disable external IP passthrough mode: Network Setting -> Broadband -> Cellular APN -> #1 -> Modify icon -> "IP Passthrough" slider to off | |
2. Use "management" Wi-Fi AP as general Wi-Fi AP (with limitations) -> Network Setting -> Bridge1 -> Modify icon -> Move the Wi-Fi AP interface to the pane on the right alongside LAN1 | |
NOTE: by default, once you do the above, the router will happily pass traffic from devices on the Wi-Fi AP to other devices on the LAN1 subnet, but will block traffic originating from the Wi-Fi AP from exiting to the Internet via the LTE side of the device. You can clumsily hack around this by setting another device, e.g. another Wi-Fi AP or Raspberry Pi or Cray supercomputer, as the default gateway for the LAN1 subnet in your DHCP server config, and pointing *that* device at the Zyxel as *its* default GW. This adds additional hops, but enabl |
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
groups: | |
# These sum(irate()) functions are in separate groups, so they run in parallel | |
- name: istio.workload.istio_request_duration_milliseconds_bucket | |
interval: 10s | |
rules: | |
- record: workload:istio_request_duration_milliseconds_bucket:rate1m | |
expr: | | |
sum(irate(istio_request_duration_milliseconds_bucket{reporter="source", source_workload!=""}[1m])) | |
by ( |
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
# use the latest ubuntu environment (18.04) available on travis | |
dist: bionic | |
language: go | |
# You don't need to test on very old versions of the Go compiler. It's the user's | |
# responsibility to keep their compiler up to date. | |
go: | |
- 1.16.x |
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
import http from 'http'; | |
import express from 'express'; | |
import bodyParser from 'body-parser'; | |
import cookieParser from 'cookie-parser'; | |
import expressValidator from 'express-validator'; | |
import Session from 'express-session'; | |
import morgan from 'morgan'; | |
import mongoose from 'mongoose'; | |
import passport from 'passport'; | |
import { createClient as createRedisClient } from 'redis'; |
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
-- Two dashes start a one-line comment. | |
--[[ | |
Adding two ['s and ]'s makes it a | |
multi-line comment. | |
--]] | |
---------------------------------------------------- | |
-- 1. Variables and flow control. | |
---------------------------------------------------- |
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_PATH=/opt/local/include | |
LIBRARY_PATH=/opt/local/lib | |
CC_OPTS=-O2 | |
all: | |
gcc test.c -o test $(CC_OPTS) -I$(INCLUDE_PATH) -L$(LIBRARY_PATH) -lbeagleboneio |