Getting started:
Related tutorials:
- MySQL-CLI: https://www.youtube.com/playlist?list=PLfdtiltiRHWEw4-kRrh1ZZy_3OcQxTn7P
- Analyzing Business Metrics: https://www.codecademy.com/learn/sql-analyzing-business-metrics
class Class { | |
w(config) { | |
config = arguments[1]; config.url = arguments[0]; console.log(arguments[1],arguments[0]); | |
} | |
} | |
new Class().w('xxx', {}) | |
function fn(config) { config = arguments[1]; config.url = arguments[0]; console.log(arguments[1],arguments[0]); } | |
fn('xxx', {}) |
const fs = require('fs'); | |
const lock = require('./package-lock'); | |
function fixDeps(dependencies) { | |
Object.keys(dependencies).forEach(key => { | |
const dep = dependencies[key]; | |
const names = key.split('/'); | |
const name = names[names.length - 1]; | |
if ( | |
dep.resolved && |
/* | |
DO NOT USE THIS POLYFILL | |
because `instanceof` operator won't work | |
copy from | |
https://github.com/paulmillr/es6-shim | |
https://github.com/wesleytodd/setprototypeof | |
https://github.com/zloirock/core-js | |
*/ | |
Object.setPrototypeOf = |
async function async1() { | |
console.log('async 1') | |
await async2() | |
await async3() | |
console.log('async 1-1') | |
} | |
async function async2() { | |
console.log('async 2') | |
} |
class Point { | |
set X(v) { | |
this.x = v; | |
} | |
get X() { | |
return this.x; | |
} | |
getX() { | |
console.log(this.X); | |
} |
ipset -N gfwlist iphash | |
#Telegram | |
ipset add gfwlist 91.108.56.0/22 | |
ipset add gfwlist 91.108.4.0/22 | |
ipset add gfwlist 109.239.140.0/24 | |
ipset add gfwlist 149.154.160.0/20 | |
#iptables | |
iptables -t nat -A prerouting_lan_rule -p tcp -m set --match-set gfwlist dst -j REDIRECT --to-port 1080 |
[Unit] | |
Description=Aria2 Service | |
After=network.target | |
[Service] | |
Type=forking | |
ExecStart=/usr/bin/aria2c --conf-path=%h/.config/aria2/aria2.daemon | |
[Install] | |
WantedBy=default.target |
Getting started:
Related tutorials:
function listProperties(obj, objStr, option){ | |
var getPropertyNames = function(obj){ | |
var keys = []; | |
for(var key in obj){ | |
keys.push(key); | |
} | |
return keys; | |
}; | |
var func = getPropertyNames; |
@echo off | |
( | |
echo [Local Hosts] | |
echo ## China mainland domains | |
echo ## Sources: https://github.com/felixonmars/dnsmasq-china-list | |
echo. | |
) > "WhiteList.txt" | |
Tools\Routing_Update\bin\curl -O https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/accelerated-domains.china.conf |