Skip to content

Instantly share code, notes, and snippets.

View mapleincode's full-sized avatar
🤣
GOOD DAY WITH GOOD CODING

MapleinCode mapleincode

🤣
GOOD DAY WITH GOOD CODING
View GitHub Profile
// function getHumpName(name = '') {
// let start = true;
// let results = '';
// for(let i = 0; i < name.length; i++) {
// if (start) {
// if(name[i] === '_') {
// results += name[i];
// continue;
// }
@mapleincode
mapleincode / rcache.ts
Last active October 25, 2019 07:34
rcache
import { Redis } from 'ioredis';
import RedisService = require('ioredis');
import Debug from 'debug';
const debug = Debug('rcache');
interface UpdateFunc<Data extends { [key: string]: any }> {
(options?: Partial<Data>): Promise<Data|null|undefined>;
}
/**
* https://blog.csdn.net/u012369749/article/details/73784897
*/
const Base64 = {
// private property
_keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
// public method for encoding
encode(input) {
let output = "";
@mapleincode
mapleincode / open-chrome.bash
Last active July 18, 2017 09:50
用 chrome 浏览器打开一个特定的网页(mac)
open -a "/Applications/Google Chrome.app" 'http://www.zhihu.com'
"use strict";
const wmdl = require("wmdl");
const async = require("async");
let url = "http://www.xiumm.org/photos/XiuRen-16992.html";
// http://www.xiumm.org/photos/UGirls-17391-2.html
const request = require("request");
@mapleincode
mapleincode / redis.lua
Created March 8, 2017 02:31
block redis
-- provide by Zhang Chao
local _M = {}
function _M.get_redis_obj(block)
local red
local callback = function(host, port)
local ok, err = red:connect(host, port)
@mapleincode
mapleincode / resume.md
Last active September 30, 2019 18:57
resume

简历

个人信息