Skip to content

Instantly share code, notes, and snippets.

View guanhui07's full-sized avatar
:octocat:
Focusing

royee guanhui07

:octocat:
Focusing
View GitHub Profile
@starfalling
starfalling / hyperf-hot-restart-in-dev.php
Last active March 7, 2022 05:42
hyperf hot restart in development
<?php
declare(strict_types=1);
/**
* 使用方式:
* 1. 把文件放置到项目的 bin 目录中,更名为 dev.php
* 2. 开发中启动项目时,使用 dev.php 进行启动,而不是使用 hyperf.php 进行启动
*/
@membphis
membphis / gist:05064f2edc6fb4081c6af04fac43ba49
Created July 3, 2019 00:26
benchmark apisix 0.5 with fake apisix server
# ./benchmark/run.sh
+ '[' -n '' ']'
+ worker_cnt=1
+ mkdir -p benchmark/server/logs
+ mkdir -p benchmark/fake-apisix/logs
+ sudo openresty -p /root/apisix/benchmark/server
+ trap onCtrlC INT
+ sed -i 's/worker_processes [0-9]*/worker_processes 1/g' conf/nginx.conf
+ make run
mkdir -p logs
FROM centos:7.3.1611
RUN yum update -y && yum install -y wget make gcc gcc-c++ unzip git patch readline-devel \
bzip2 zlib zlib-devel
ENV BUILD_PATH=/tmp/build
RUN mkdir --verbose -p "$BUILD_PATH"
ENV PCRE_VERSION=8.43
@oliveratgithub
oliveratgithub / emojis.json
Last active August 18, 2025 13:35
Emoji-list with emojis, names, shortcodes, unicode and html entities [massive list]
{
"emojis": [
{"emoji": "👩‍👩‍👧‍👧", "name": "family: woman, woman, girl, girl", "shortname": ":woman_woman_girl_girl:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F467", "html": "&#128105;&zwj;&#128105;&zwj;&#128103;&zwj;&#128103;", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👧‍👦", "name": "family: woman, woman, girl, boy", "shortname": ":woman_woman_girl_boy:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F466", "html": "&#128105;&zwj;&#128105;&zwj;&#128103;&zwj;&#128102;", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👦‍👦", "name": "family: woman, woman, boy, boy", "shortname": ":woman_woman_boy_boy:", "unicode": "1F469 200D 1F469 200D 1F466 200D 1F466", "html": "&#128105;&zwj;&#128105;&zwj;&#128102;&zwj;&#128102;", "category": "People & Body (family)", "order": ""},
{"emoji": "👨‍👩‍👧‍👧", "name": "family: man, woman, girl, girl", "shortname": ":man_woman_girl_girl:", "unicode": "1F468 200D 1F469 200D 1F467 200D 1F467", "html": "&#128104;&zwj;&#128105;&z

Redis 4.2 roadmap

  1. Redis Cluster
  • Speed up key -> hashslot association. Now makes RBB loading 4x slower when there are many small keys.
  • Better multi data center story
  • redis-trib C coded and moved into redis-cli
  • Backup / Restore of Cluster
  • Non blocking MIGRATE (also consider not using 2X memory)
  • Faster resharding
  • Bug fixing and stress testing to bring it to next level of maturity
@wbotelhos
wbotelhos / libreadline_6_not_found.sh
Created November 29, 2016 20:42
Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib (LoadError)
ln -s /usr/local/opt/readline/lib/libreadline.7.0.dylib /usr/local/opt/readline/lib/libreadline.6.dylib
@guanhui07
guanhui07 / makeauthority.sh
Created September 27, 2016 03:42 — forked from richieforeman/makeauthority.sh
Issue Your Own Self-Signed S/MIME Certs with OpenSSL
# Run this once
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
@challengeYY
challengeYY / hostloc.py
Last active April 10, 2019 09:57
hostloc论坛每日翻牌
#encoding=utf-8
import requests
from bs4 import BeautifulSoup
import re
import sys
import datetime
uid="11111" #用户名
pwd="11111" #密码
@agentzh
agentzh / dns_server.lua
Created August 18, 2016 19:33
My first hacked version of silly Lua DNS server atop NGINX (with patched ngx_stream_lua_module).
local bit = require "bit"
local byte = string.byte
local lshift = bit.lshift
local rshift = bit.rshift
local concat = table.concat
local insert = table.insert
local char = string.char
local band = bit.band
local sub = string.sub
local gsub = string.gsub
@keelii
keelii / vimrc
Last active September 29, 2024 14:48
vimrc for window
" ------------------------------
" Name: vimrc for windows
" Author: keelii
" Email: [email protected]
" ------------------------------
" Startup {{{
filetype indent plugin on
augroup vimrcEx