Skip to content

Instantly share code, notes, and snippets.

@zhfish
zhfish / gist:a615a1ff61c896f9598c82b77295f410
Created December 12, 2019 05:18
use Softether client on a MAC
`brew install tuntap`
```
sudo /opt/vpnclient/vpnclient start
sudo /opt/vpnclient/vpncmd
# Creates VPN Virtual NIC
sudo /opt/vpnclient/vpncmd localhost /CLIENT /CMD NicCreate ether
# Create Account
sudo /opt/vpnclient/vpncmd localhost /CLIENT /CMD AccountCreate [account_name] /SERVER:vpn.evercam.io:80 /HUB:DEFAULT /USERNAME:[username] /NICNAME:ether
,--.
,--.'|
,--,: : | Nacos 1.1.4
,`--.'`| ' : ,---. Running in stand alone mode, All function modules
| : : | | ' ,'\ .--.--. Port: 8848
: | \ | : ,--.--. ,---. / / | / / ' Pid: 25
| : ' '; | / \ / \. ; ,. :| : /`./ Console: http://33442f932264:8848/nacos/index.html
' ' ;. ;.--. .-. | / / '' | |: :| : ;_
| | | \ | \__\/: . .. ' / ' | .; : \ \ `. https://nacos.io
@zhfish
zhfish / CentOS-Aliyun.repo
Created October 20, 2019 13:07
Centos8 Aliyun mirror
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
@zhfish
zhfish / batcn_cancel.js
Created October 13, 2019 06:45
微博批量取消关注
const s = document.createElement('script');
s.setAttribute(
'src',
'https://lib.sinaapp.com/js/jquery/2.0.3/jquery-2.0.3.min.js'
);
document.head.appendChild(s);
const sall = () => {
try {
$('a[action-type="batselect"]')[0].click();
@zhfish
zhfish / batch.js
Created October 13, 2019 05:47
批量删除微博
var s = document.createElement('script');
s.setAttribute(
'src',
'https://lib.sinaapp.com/js/jquery/2.0.3/jquery-2.0.3.min.js'
);
s.onload = function() {
setInterval(function() {
if (!$('a[action-type="feed_list_delete"]')) {
$('a.next').click();
} else {

Array<T>

Legend:

  • ✏️ method changes this.
  • 🔒 method does not change this.

Array<T>.prototype.*:

  • concat(...items: Array): T[] 🔒 ES3

Strings

String.prototype.*

None of the string methods modify this – they always return fresh strings.

  • charAt(pos: number): string ES1

    Returns the character at index pos, as a string (JavaScript does not have a datatype for characters). str[i] is equivalent to str.charAt(i) and more concise (caveat: may not work on old engines).

@zhfish
zhfish / settings.json
Created November 11, 2016 10:25
vscode config
// 将设置放入此文件中以覆盖默认设置
// 字体 https://github.com/adobe-fonts/source-code-pro/releases
{
"editor.fontFamily": "'Source Code Pro'",
"editor.fontSize": 14,
"http.proxy": "http://127.0.0.1:1087",
"http.proxyStrictSSL": false,
"telemetry.enableTelemetry": false,
"telemetry.enableCrashReporter": false,
"terminal.external.osxExec": "iTerm.app",
@zhfish
zhfish / frp.conf
Last active June 23, 2017 00:01
frp config
#/etc/nginx/conf.d/frp.conf
server {
listen 80;
server_name *.tunnel.frp.com;
charset utf-8;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@zhfish
zhfish / README.md
Last active November 11, 2016 10:45
[Genymotion] Tool Collections

[Genymotion] Tool Collections

分享一下個人打包給 Genymotion 使用的工具軟體,方便開發者或玩家從 Play Store 下載 apps or games,包括:

ARM Translation (5.x & 6.x) Google Apps (5.0, 5.1, 6.0) 裡面的檔案主要是設定 Google Account 與 Play Store,打包自 Open GApps Project pico 版。 SuperSU 2.65 版 直接丟入模擬器的視窗,依照指示按 OK 鈕,重開即可使用。

檔案在這:https://mega.nz/#F!JhcFwKpC!yfhfeUzvIZoSdBgfdZ9Ygg