Skip to content

Instantly share code, notes, and snippets.

View 名称允许字串.js
const raw_name_allow = /^[ -~¡-¬®-ʸぁ-ヿ㐀-䶵가-힣、-〼,!?;:( )[]【】—一-鿏]+$/;
const raw_name_regulate = str => str.replace(/[\s\n\r\t]/g, " ").replace(/[*=@#%&?|\\{}\[\]:]/g, "");
View init.psql
Executing (default): CREATE TABLE IF NOT EXISTS "clearances" ("name" VARCHAR(1024) NOT NULL UNIQUE, "id" BIGSERIAL UNIQUE , "created_at" TIMESTAMP WITH TIME ZONE NOT NULL, "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL, UNIQUE ("name"), UNIQUE ("id"), PRIMARY KEY ("id"));
Executing (default): SELECT i.relname AS name, ix.indisprimary AS primary, ix.indisunique AS unique, ix.indkey AS indkey, array_agg(a.attnum) as column_indexes, array_agg(a.attname) AS column_names, pg_get_indexdef(ix.indexrelid) AS definition FROM pg_class t, pg_class i, pg_index ix, pg_attribute a WHERE t.oid = ix.indrelid AND i.oid = ix.indexrelid AND a.attrelid = t.oid AND t.relkind = 'r' and t.relname = 'clearances' GROUP BY i.relname, ix.indexrelid, ix.indisprimary, ix.indisunique, ix.indkey ORDER BY i.relname;
(sequelize) Warning: PostgreSQL does not support TEXT with options. Plain `TEXT` will be used instead., '
>> Check:', http://www.postgresql.org/docs/9.4/static/datatype.html
Executing (default): CREATE TABLE IF NOT EXISTS "con
View options-ssl-nginx.conf
# This file contains important security parameters. If you modify this file
# manually, Certbot will be unable to automatically provide future security
# updates. Instead, Certbot will print and log an error message with a path to
# the up-to-date file that you will need to refer to when manually updating
# this file.
ssl_session_cache shared:le_nginx_SSL:1m;
ssl_session_timeout 1440m;
ssl_protocols TLSv1.1 TLSv1.2; # notice here i manually disabled tlsv1 which afaik is being phaseed out june 2018
View test.js
if("// testing load speed", true) {
"use strict";
const load_cycles = 10;
let time_s = 0;
let execution = 0;
let done = 0;
const request_uri = "/zh/于斯納爾斯貝里市";
// const request_uri = "/zh/2004年澳门华榕大厦纵火案";
View one-pager.html
<!DOCTYPE html>
<html lang="${lookitup('html tag lang code')}">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="${lookitup('meta description tag content')}" />
<title>${lookitup('Open Ticket System')}</title>
<script>