Skip to content

Instantly share code, notes, and snippets.

View dontcry2013's full-sized avatar

Zac Qin dontcry2013

View GitHub Profile
@dontcry2013
dontcry2013 / httpHelper.js
Last active August 10, 2018 02:57
node.js http tool to handle GBK encoding
/**
* @fileOverview http请求的工具操作集,包含请求超时时间设置
* @module tool/httpHelper
*/
var http = require('http');
var https = require('https');
var qs = require('querystring');
var iconv = require('iconv-lite');
var BufferHelper = require('bufferhelper');
var myTravel = `{
"data": [
{
"joinMax": "10",
"clicks": 2393,
"content": "",
"travelPic": "http://ac-afkydcqq.clouddn.com/f7a0443a710ceded28ef.jpg",
"endTime": {
"__type": "Date",
"iso": "2017-03-28T05:41:00.000Z"
@dontcry2013
dontcry2013 / AOP.js
Last active August 12, 2018 11:23
js technic
var service = function(){
console.log('task start...');
}
var test = (function(){
var time_start;
return {
before: function(){
time_start = (+new Date());
console.log('cunting...');
},
@dontcry2013
dontcry2013 / CentOS7.md
Last active April 24, 2020 03:57
Linux Command
We couldn’t find that file to show.
@dontcry2013
dontcry2013 / cookies.js
Last active April 10, 2019 00:33 — forked from CrocoDillon/cookies.js
Export your awesome module using AMD, CommonJS, Node.js or just as global.
/*
* Inspiration (well… copy pasting more or less) from:
* https://github.com/ScottHamper/Cookies/blob/0.3.1/src/cookies.js#L127-L140
*
* Thanks Scott!
*/
(function (global) {
'use strict';
var MyModule = function () {
var tempDataArray2 = [
"1|112|223|119|23",
"2|212|123|119|23",
"1|212|223|119|23",
"3|2|223|119|23",
"3|1|2233|119|25",
"3|1|2233|119|23",
"3|1|223|119|23",
];
@dontcry2013
dontcry2013 / git_branch_practice.md
Last active May 3, 2019 04:27
git branch practice

git建议操作流程

此建议操作流程以真实开发过程为例(Student Service)

新建本地test分支

  1. 首先查看本地和远端的分支
DEVs-MBP:ss devmac$ git branch -avv

  master               0f7de684 [web/master] 恢复app/View/Elements/addDocumentChecklist.ctp

  teaching             019cfe69 add academic router again
@dontcry2013
dontcry2013 / multiple_ssh_setting.md
Last active February 22, 2024 06:07 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"