Skip to content

Instantly share code, notes, and snippets.

#
# fair-queue based settings for EdgeRouter Lite traffic shaping
#
# download is typically 30 and change. everything can burst to 100%
# of bandwidth, priority rules keep the garbage in check
set traffic-policy shaper download
set traffic-policy shaper download bandwidth 60Mbit
@Dianoga
Dianoga / test.groovy
Last active September 30, 2015 14:48
/**
* Test
*
* Copyright 2015 Brian Steere
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@Dianoga
Dianoga / 0_reuse_code.js
Created February 11, 2016 16:24
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
048c76c6c2eb6c5b8dfcfba1e8d9d0e3a6b75a0da7b34721b4b494f741ff37527678f5eaa1e7bc011fbeb6d5c47f1eef58b88e010df3164c4e026598019783c2d4
@Dianoga
Dianoga / ttp-appt.js
Created January 2, 2020 19:06
Trusted Traveler Better Appointment Checker
#!/usr/bin/node
const https = require('https');
const currentAppt = '2020-05-26T09:30'; // Replace with the timestamp of your current appointment
const locationId = 6840; // Replace with the id of the location you want to check
const pushoverApiKey = '<your pushover api key>';
const pushoverUserKey = '<your pushover user key>';
configure
# Configure Firewall
set firewall ipv6-name IPV6WAN_IN description 'IPV6WAN to internal'
set firewall ipv6-name IPV6WAN_IN default-action drop
set firewall ipv6-name IPV6WAN_IN rule 10 action accept
set firewall ipv6-name IPV6WAN_IN rule 10 state established enable
set firewall ipv6-name IPV6WAN_IN rule 10 state related enable
set firewall ipv6-name IPV6WAN_IN rule 10 log disable
/* [General] */
// Transition length in mm
transition_length = 10;
// Number of sections in cylinder (more = more circular)
circle_sections = 360;
// Used for debugging
show_real_part = true;
@Dianoga
Dianoga / mvp.ts
Created July 23, 2021 15:12
node-mv with promises and typescript
import mv from 'mv';
export function mvp(
src: string,
dest: string,
options: mv.Options = {}
): Promise<void> {
return new Promise((resolve, reject) => {
mv(src, dest, options, (error) => {
if (error) reject(error);