Skip to content

Instantly share code, notes, and snippets.


Panda wujunze

View GitHub Profile
View safari-reaper.html
<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
body {
antirez /
Last active Jun 2, 2020
RESP3 protocol draft

RESP3 specification

Versions history:

  • 1.0, 2 May 2018, Initial draft to get community feedbacks.


The Redis protocol has served us well in the past years, showing that, if carefully designed, a simple human readable protocol is not the bottleneck in the client server communication, and that the simplicity of the design is a major advantage in creating a healthy client libraries ecosystem.

Yet the Redis experience has shown that after about six years from its introduction (when it replaced the initial Redis protocol), the current RESP protocol could be improved, especially in order to make client implementations simpler and to support new features.

lifei6671 / snowflake.php
Created Aug 15, 2017
View snowflake.php
* 使用 snowflake 算法生成递增的分布式唯一ID.
* 该算法支持 15 条业务线,4 个数据中心,每个数据中心最多 128 台机器,每台机器每毫秒可生成 4096 个不重复ID.
class Snowflake
const SEQUENCE_BITS = 12;
phith0n /
Last active May 12, 2021
Fastcgi PHP-FPM Client && Code Execution
import socket
import random
import argparse
import sys
from io import BytesIO
# Referrer:
PY2 = True if sys.version_info.major == 2 else False
cedricziel /
Created Jan 12, 2017
Very simple migration script to move from gitlab to gogs
#!/bin/env bash
## Needs `jq` ( on PATH
## and a personal gogs token of yours.
## Obtain token from
## Usage:
## ./ $clone_url $project_name [$optional_group]
## Migrate a repository to gogs into the user namespace of the token-user
## ./ repo
## Migrate a repository to gogs into the group namespace `group` (needs to exist)
tevino / epoll.go
Last active May 2, 2021
An example of using epoll in Go
View epoll.go
package main
import (
const (
saelo / decorator.go
Created Mar 8, 2015
Decorators in Go
View decorator.go
package main
import (
func Decorate(impl interface{}) interface{} {
fn := reflect.ValueOf(impl)
mattstauffer /
Last active May 9, 2021
Introduction to GistLog

So, you might be asking yourself, what is GistLog?

GistLog is a blogging "platform" for people who want to quickly write and publish content, in Markdown, and don't want to bother with yet another platform and yet another login and yet another group hoarding their content. With GistLog, you use your pre-existing GitHub login, you store the data in your own GitHub account, and you can publish with a single click.

Using GistLog

  1. Create a public gist with a single file using Markdown. Set the gist description to be the title of your blog post
  2. Copy the gist URL, and paste it into the text box on the GistLog create page
  3. Copy your resulting URL and share it as your blog post—note that it will be in the form of
  4. If you want to have your own GistLog landing page (e.g., [read all about it](
edokeh / index.js
Last active May 8, 2021
佛祖保佑,永无 BUG
View index.js
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
View patch-edid.rb
# Create display override file to force Mac OS X to use RGB mode for Display
# see
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`