OpenWRT 的一套配置,用于在教育网宿舍里的路由器上部署,使得子网内的设备可以获取到全球路由的 IPv6 地址。
上海交通大学闵行校区大部分宿舍。宿舍网络通过 DHCPv6 下发 IPv6 地址(不支持 PD),因而路由器得到的是 /128 地址,无法再次分配给子网内设备。
| const data = require('./data'); | |
| const _ = require('lodash'); | |
| const moment = require('moment'); | |
| const ics = require('ics'); | |
| const fs = require('fs'); | |
| const timePeriod = (date, from, to) => { | |
| const _from = moment(`${date} ${data.timetable.data[from - 1]}:00`); | |
| const _end = moment(`${date} ${data.timetable.data[to - 1]}:00`).add(data.timetable.length, 'minute'); | |
| return [_from, _end]; |
| const data = require('./data.json'); | |
| const reg = { | |
| time: /星期(.*?)[ ]+第(.*?)节--第(.*?)节/, | |
| header: /行课安排为第(.*?)-(.*?)周?,其中:/, | |
| loc: /(.*?)\((.*?)-(.*?)周\)[ ]+(.*?)\((.*?)-(.*?)周\)/, | |
| loc_unknown: /[ ]*(.*?)[ ]+(.*?)\((.*?)-(.*?)周\)/, | |
| bi_week: /(单|双)周/ | |
| }; | |
| const fetch_data = { | |
| header: ["week_start", "week_end"], |
| #include <iostream> | |
| #include <algorithm> | |
| #include <queue> | |
| #include <vector> | |
| using namespace std; | |
| struct queue_item { | |
| int x, y; | |
| int step; |
| #include <iostream> | |
| #include <algorithm> | |
| using namespace std; | |
| const int N = 12; | |
| int queen_status[N]; | |
| /* | |
| * AAAA |
| const {Builder, By, Key, until} = require('selenium-webdriver'); | |
| let processed_text = {}; | |
| (async function do_fetch() { | |
| let driver = await new Builder().forBrowser('chrome').build(); | |
| try { | |
| await driver.get('http://web2.qq.com'); | |
| while(true) { | |
| await driver.wait(until.elementLocated(By.id("panelTitle-5"))); |
| #!/usr/bin/env bash | |
| docker run -it --privileged --network pub_net skyzh/iptables-playground bash |
| #include <iostream> | |
| #include <algorithm> | |
| #include <vector> | |
| #include <functional> | |
| #include <cmath> | |
| using namespace std; | |
| struct Vertex { | |
| long long x, y; | |
| Vertex(long long x, long long y) { |
| const Koa = require('koa') | |
| const app = new Koa() | |
| app.use(ctx => { | |
| ctx.response.body = {} | |
| }) | |
| app.listen(8000) |
2018 年上海高考综合评价数据分析。数据来自阳光高考公示。