opkg update
opkg install luci-app-sqm kmod-sched-ctinfo iptables-mod-hashlimit ipset nano
# Install modified layer_cake to sqm-scripts
wget https://gist.githubusercontent.com/heri16/06c94b40f0d30f11e3a82166eca718f3/raw/layer_cake_ct.qos -O /usr/lib/sqm/layer_cake_ct.qos
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
const bucketName = ""; | |
const bucketEnpoint = ""; | |
const s3 = new AWS.S3({ | |
params: { Bucket: bucketName }, | |
endpoint: bucketEndpoint, | |
s3BucketEndpoint: true, | |
// s3DisableBodySigning: false, | |
computeChecksums: true, | |
correctClockSkew: true, |
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 React from 'react' | |
import { Switch, Route } from 'react-router-dom' | |
import { Amplify } from '@aws-amplify/core' | |
import { amplifyConfig } from './config' | |
import { AllContextProvider } from './context' | |
import { |
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
const { chain } = require('stream-chain'); | |
const { parser } = require('stream-json'); | |
const { pick } = require('stream-json/filters/Pick'); | |
const { filter } = require('stream-json/filters/Filter'); | |
const { streamValues } = require('stream-json/streamers/StreamValues'); | |
const { disassembler } = require('stream-json/Disassembler'); | |
const { stringer } = require('stream-json/Stringer'); | |
const ST = require('stream-template'); |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> | |
<CORSRule> | |
<AllowedOrigin>https://*</AllowedOrigin> | |
<AllowedMethod>HEAD</AllowedMethod> | |
<AllowedMethod>GET</AllowedMethod> | |
<AllowedMethod>PUT</AllowedMethod> | |
<AllowedMethod>POST</AllowedMethod> | |
<AllowedMethod>DELETE</AllowedMethod> | |
<AllowedHeader>*</AllowedHeader> |
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
const file1 = { | |
name: "example/file1.txt", | |
stream: () => new Blob(["support blobs too"]).stream() | |
}; | |
// Note: windows gets confused when file & folders starts with / | |
const fileMap = new Map([ | |
["file1", file1], | |
["file2", new File(["file1 content"], "example/file2.txt")], | |
["zip-subfolder/Sintel.mp4", "s3key/Sintel.mp4"], |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> | |
<CORSRule> | |
<AllowedOrigin>https://*</AllowedOrigin> | |
<AllowedMethod>HEAD</AllowedMethod> | |
<AllowedMethod>GET</AllowedMethod> | |
<AllowedMethod>PUT</AllowedMethod> | |
<AllowedMethod>POST</AllowedMethod> | |
<AllowedMethod>DELETE</AllowedMethod> | |
<AllowedHeader>*</AllowedHeader> |
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
# | |
# /etc/bash.bashrc | |
# | |
# ...... | |
# Custom functions | |
function expac-diff-file { | |
if [[ "$1" == "" ]]; | |
then |
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
<domain xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0" type="kvm"> | |
<name>win10</name> | |
<uuid>d2c97462-3a70-4afb-ab72-5916e8ac25ae</uuid> | |
<title>Windows 10</title> | |
<metadata> | |
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0"> | |
<libosinfo:os id="http://microsoft.com/win/10"/> | |
</libosinfo:libosinfo> | |
</metadata> | |
<memory unit="KiB">12582912</memory> |
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
// Special chars from https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-policies.html | |
const validUppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; | |
const validLowercase = 'abcdefghijklmnopqrstuvwxyz'; | |
const validNumber = '0123456789'; | |
const validSpecial = '^$*.[]{}()?"!@#%&/\\,><\':;|_~\`'; | |
const validChars = validSpecial + validUppercase + validLowercase + validNumber; | |
// See: https://javascript.info/regular-expressions | |
const regexpUppercase = new RegExp(`[${validUppercase}]`, 'g'); | |
const regexpLowercase = new RegExp(`[${validLowercase}]`, 'g'); |