Skip to content

Instantly share code, notes, and snippets.

@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active July 27, 2024 21:19
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized
var CryptoJS = require('crypto-js')
var request = require('request-promise')
/*
* npm install crypto-js request-promise request
* node wx_t1t_hack.js
*/
// export function testEncription(msg, fullKey) {
// var fullKey = fullKey.slice(0, 16)
@cloudwu
cloudwu / pimpl.cpp
Last active July 3, 2017 10:51
My version of pimpl
// My version of pimpl (cloudwu@gmail.com)
// See http://en.cppreference.com/w/cpp/language/pimpl
#include <iostream>
// interface (widget.h)
class widget {
struct impl;
public:
static widget* create(int); // replacement of new
@cloudwu
cloudwu / testtun.lua
Last active September 23, 2017 09:58
A timeout tunnel service (skynet)
local skynet = require "skynet"
require "skynet.manager"
local mode = ...
if mode == "slave" then
skynet.start(function()
skynet.dispatch("lua", function(session, address, ti, ...)
if session == 0 then