Skip to content

Instantly share code, notes, and snippets.

View fengmk2's full-sized avatar
:atom:
Coding at antgroup.com

fengmk2 fengmk2

:atom:
Coding at antgroup.com
View GitHub Profile
@fengmk2
fengmk2 / README.md
Created April 7, 2016 14:43 — forked from atian25/README.md
Stop and start Symantec Endpoint Protection on OS X

This script enables you stop and start Symantec Endpoint Protection on OS X

Installation

sudo curl https://gist.githubusercontent.com/steve-jansen/61a189b6ab961a517f68/raw/sep -o /usr/local/bin/sep
sudo chmod 755 /usr/local/bin/sep
sudo chown root:staff /usr/local/bin/sep
# sysctl -a|grep tcp
net.ipv4.tcp_abort_on_overflow = 0
net.ipv4.tcp_adv_win_scale = 1
net.ipv4.tcp_allowed_congestion_control = cubic reno
net.ipv4.tcp_app_win = 31
net.ipv4.tcp_available_congestion_control = cubic reno
net.ipv4.tcp_base_mss = 512
net.ipv4.tcp_challenge_ack_limit = 100
net.ipv4.tcp_congestion_control = cubic
net.ipv4.tcp_dsack = 1
@fengmk2
fengmk2 / package.json
Created February 4, 2016 14:52
cnpmjs.org's package.json
{
"name": "cnpmjs.org",
"version": "2.7.1",
"description": "Private npm registry and web for Enterprise, base on MySQL and Simple Store Service",
"main": "index.js",
"scripts": {
"test": "make jshint && make test",
"start": "./bin/nodejsctl start && cp History.md docs/web/history.md",
"status": "./bin/nodejsctl status",
"stop": "./bin/nodejsctl stop"

☺️💕🙈😴😴😂

@fengmk2
fengmk2 / node-binaries-download-stats.md
Last active December 17, 2015 16:24
npm.taobao.org node binaries dowload stats in 2015-11 and 2015-12

$ sudo gunzip access.log.47.gz
$ sudo grep '/Nov' access.log | grep '/mirrors/node/'| grep -v 'docs'|grep 302|wc -l

2015-11-01 - 2015-11-30

Total: 20544

@fengmk2
fengmk2 / co-readable-all.js
Last active August 29, 2015 14:27
co readable example
'use strict';
const readable = require('co-readable');
const content = yield readable.all(fs.createReadStream('bigfile'));
@fengmk2
fengmk2 / test.html
Created June 13, 2015 03:15
test html
<!DOCTYPE html> <html> <head> <meta charset="gb2312"> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <title>支付宝 知托付!</title> <meta name="keywords" content="支付宝,电子支付/网上支付/安全支付/手机支付,安全购物/网络购物付款/付款/收款,水电煤缴费/信用卡还款/AA收款,支付宝网站"> <meta name="description" content="支付宝,全球领先的独立第三方支付平台,致力于为广大用户提供安全快速的电子支付/网上支付/安全支付/手机支付体验,及转账收款/水电煤缴费/信用卡还款/AA收款等生活服务应用。"> <!--[if lte IE 7]>
<script type="text/javascript">
window.location.href = 'https://www.alipay.com/x/kill-ie.htm';
</script>
<![endif]--> <link href="https://a.alipayobjects.com" rel="dns-prefetch" /> <link href="https://app.alipay.com" rel="dns-prefetch" /> <link href="https://my.alipay.com" rel="dns-prefetch" /> <link href="https://lab.alipay.com" rel="dns-prefetch" /> <link href="https://cashier.alipay.com" rel="dns-prefetch" /> <link href="https://financeprod.alipay.com" rel="dns-prefetch" /> <link href="https://shenghuo.alipay.com" rel="dns-prefetch" /> <script type="text/javascript">
window._to = { start: new Date() };
</script> <script typ
$ cat mirrors/nodejs_stdout.log
[Tue Jan 20 2015 13:48:58 GMT+0800 (CST)] [worker:22680] new worker start
[Tue Jan 20 2015 13:49:01 GMT+0800 (CST)] [worker:22680] Server started, dist server listen at 127.0.0.1:7003, cluster: true
Error: read ECONNRESET
at exports._errnoException (util.js:742:11)
at TCP.onread (net.js:535:26)
[error] 2015-01-21 08:32:51.981 nodejs.ECONNRESETErrorException: Error: read ECONNRESET
at exports._errnoException (util.js:742:11)
at TCP.onread (net.js:535:26)
pid: 22680
@fengmk2
fengmk2 / co-leak.js
Last active February 19, 2016 19:30
co memory leak again
// "co": "~4.1.0",
var co = require('co');
var urllib = require('urllib');
var count = 0;
co(function* () {
while (true) {
try {
yield urllib.request('http://cnpmjs.org/mirrors/apis/iojs');
} catch (err) {
console.error(err);
@fengmk2
fengmk2 / getqujing.md
Last active August 29, 2015 14:13
my qujing proxy sites