Skip to content

Instantly share code, notes, and snippets.

View zheng1's full-sized avatar
👓
Mogician

Zhengyi Lai zheng1

👓
Mogician
View GitHub Profile
@zheng1
zheng1 / messages
Last active May 11, 2020 14:59
alpine
May 11 22:49:52 i-na80fute syslog.info syslogd started: BusyBox v1.31.1
May 11 22:49:52 i-na80fute daemon.info init: starting pid 2625, tty '': '/sbin/openrc default'
May 11 22:49:53 i-na80fute auth.info sshd[2749]: Server listening on 0.0.0.0 port 22.
May 11 22:49:53 i-na80fute auth.info sshd[2749]: Server listening on :: port 22.
May 11 22:49:53 i-na80fute daemon.info init: starting pid 2800, tty '/dev/tty1': '/sbin/getty 38400 tty1'
May 11 22:49:53 i-na80fute daemon.info init: starting pid 2801, tty '/dev/tty2': '/sbin/getty 38400 tty2'
May 11 22:49:53 i-na80fute daemon.info init: starting pid 2802, tty '/dev/tty3': '/sbin/getty 38400 tty3'
May 11 22:49:53 i-na80fute daemon.info init: starting pid 2803, tty '/dev/tty4': '/sbin/getty 38400 tty4'
May 11 22:49:53 i-na80fute daemon.info init: starting pid 2804, tty '/dev/tty5': '/sbin/getty 38400 tty5'
May 11 22:49:53 i-na80fute daemon.info init: starting pid 2805, tty '/dev/tty6': '/sbin/getty 38400 tty6'
@zheng1
zheng1 / port.yaml
Created February 12, 2020 08:19
port本地测试
apiVersion: v1
kind: Namespace
metadata:
name: porter-system
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
name: eips.network.kubesphere.io
@zheng1
zheng1 / nginx.conf
Created November 1, 2014 06:05
nginx 正向代理
events {
worker_connections 1024;
}
http {
server {
resolver 8.8.8.8;
resolver_timeout 5s;
listen 80;
server_name "";
@zheng1
zheng1 / upyun.js
Created July 30, 2014 08:38
upyun node.js module
var crypto = require('crypto');
var http = require('http');
var _apiDomain = 'v0.api.upyun.com';
var _autoMkdir = false;
var _contentMD5 = null;
var _fileSecret = null;
var _tmpInfo = {};
var _bucketname, _username, _password;
var exec = require('child_process').exec;
var child = exec('git remote -v',function(error, stdout, stderr) {
if (stderr) console.log('stderr: ' + stderr);
if (error) return console.log('exec error: ' + error);
var stdoutArr = stdout.split('\n');
var remoteLine = stdoutArr[0].split('\t');
var remoteName = remoteLine[0];
if (remoteLine[1].indexOf('git@') !== 0) return console.log('this project do not need change');
var remoteURL = remoteLine[1].replace('git@', 'http://').replace(/:/g, '/').replace('/', ':').split(' ')[0];
{
"color_scheme": "Packages/User/Monokai (SL).tmTheme",
"word_separators": "./\\()\"':,.;<>~!@#$%^&*|+=[]{}`~?",
"translate_tabs_to_spaces": true,
"draw_minimap_border": true,
"always_show_minimap_viewport": true,
"highlight_line": true,
"highlight_modified_tabs": true,
"open_files_in_new_window": false,
"ignored_packages":

寻找优秀的 Node.js 工程师

要求:

你从不受制于单一领域的职能分工

因为你同时具备前后端的开发能力

@zheng1
zheng1 / gist:7655106
Created November 26, 2013 08:31
escapeHtml
var entityMap = {
"&": "&amp;",
"<": "&lt;",
">": "&gt;",
'"': '&quot;',
"'": '&#39;',
"/": '&#x2F;'
};
function escapeHtml(string) {
[{
"keys": ["super+right"],
"command": "moveto",
"args": {
"to": "hardeol"
}
}, {
"keys": ["super+left"],
"command": "moveto",
"args": {
@zheng1
zheng1 / jsfrak.js
Created August 13, 2013 13:07
https://github.com/noprompt/frak javascript version convert by clojurescript. instruction: '{:optimizations :simple :pretty-print true}'
var COMPILED = !0, goog = goog || {};
goog.global = this;
goog.DEBUG = !0;
goog.LOCALE = "en";
goog.TRUSTED_SITE = !0;
goog.provide = function(a) {
if(!COMPILED) {
if(goog.isProvided_(a)) {
throw Error('Namespace "' + a + '" already declared.');
}