Skip to content

Instantly share code, notes, and snippets.

:atom:
Coding at yuque.com

fengmk2 fengmk2

:atom:
Coding at yuque.com
Block or report user

Report or block fengmk2

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View regex-weburl.js
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Updated: 2010/12/05
// License: MIT
//
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it)
//
// Permission is hereby granted, free of charge, to any person
@fengmk2
fengmk2 / weibo_wap.js
Created Aug 14, 2012 — forked from dongyuwei/weibo_wap.js
自动登陆新浪微博移动版( http://m.weibo.cn ) 发微博
View weibo_wap.js
var http = require('http');
var qs = require('querystring');
function parse_response(res, callback) {
var list = [];
res.on('data', function(chunk) {
list.push(chunk);
});
res.on('end', function() {
callback(Buffer.concat(list).toString());
@fengmk2
fengmk2 / .bash_profile
Last active Dec 26, 2015 — forked from nesquena/.bash_profile
fix color on OS X
View .bash_profile
# COLORS
LIGHT_GRAY="\[\033[0;37m\]"; BLUE="\[\033[1;36m\]"; RED="\[\033[0;31m\]"; LIGHT_RED="\[\033[1;31m\]";
GREEN="\[\033[0;32m\]"; WHITE="\[\033[1;37m\]"; LIGHT_GRAY="\[\033[0;37m\]"; YELLOW="\[\033[1;33m\]";
# GIT PROMPT (http://gist.github.com/120804)
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \(\1\)/';
}
function parse_git_status {
git status 2> /dev/null | grep 'working directory clean' | wc -l;
}
@fengmk2
fengmk2 / README.md
Created Apr 7, 2016 — forked from atian25/README.md
Stop and start Symantec Endpoint Protection on OS X
View README.md

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
@fengmk2
fengmk2 / Install-nginx-with-http2-support.md
Created Nov 19, 2018 — forked from hollodotme/Install-nginx-with-http2-support.md
Install nginx with http2 support on ubuntu 14.04 LTS (Trusty)
View Install-nginx-with-http2-support.md

How to install nginx (>= 1.9.5) with http2 support on Ubuntu 14.04 LTS (Trusty)

IMPORTANT: Backup your nginx site configs (usually under /etc/nginx/sites-available)!

Remove old nginx

Remove old nginx incl. nginx-common:

apt-get autoremove --purge nginx nginx-common
You can’t perform that action at this time.