Skip to content

Instantly share code, notes, and snippets.

@rming
rming / Unicode中文和特殊字符的编码范围
Created October 25, 2017 10:32 — forked from shingchi/Unicode中文和特殊字符的编码范围
Unicode中文和特殊字符的编码范围
根据Unicode5.0整理如下:
1)标准CJK文字
http://www.unicode.org/Public/UNIDATA/Unihan.html
2)全角ASCII、全角中英文标点、半宽片假名、半宽平假名、半宽韩文字母:FF00-FFEF
http://www.unicode.org/charts/PDF/UFF00.pdf
3)CJK部首补充:2E80-2EFF
http://www.unicode.org/charts/PDF/U2E80.pdf
@rming
rming / dau.sh
Last active January 24, 2018 05:19
#!/bin/bash
LOG_DIR=/mnt/nas/backup_nginx_log/
YMD=$1
if [ ! -n "$YMD" -o ${#YMD} -ne 8 ]; then
echo -e "Usage:\n $0 [YMD] \n\n参数\n YMD 时间日期必须为 8 位数字\n\neg:\n $0 20180123"
exit
fi
FILES=""
@rming
rming / jQuery-plugin-authoring.md
Created May 23, 2018 07:03 — forked from quexer/jQuery-plugin-authoring.md
如何编写 jQuery 插件

创建插件


看来 jQuery 你已经用得很爽了,想学习如何自己编写插件。非常好,这篇文档正适合你。用插件和方法来扩展 jQuery 非常强大,把最聪明的功能封装到插件中可以为你及团队节省大量开发时间。

开始

@rming
rming / gist:19b2a0042e6e98157b103a97c0434e89
Last active August 31, 2018 01:53
laravel-optimize-cache
php artisan optimize --force
php artisan route:cache
php artisan config:cache
php artisan clear-compiled
php artisan route:clear
php artisan config:clear
@rming
rming / generate_package_json.js
Created November 23, 2018 01:48
collect the dependencies in ./node_modules.
var fs = require("fs");
function main() {
fs.readdir("./node_modules", function (err, dirs) {
if (err) {
console.log(err);
return;
}
dirs.forEach(function(dir){
if (dir.indexOf(".") !== 0) {
package main
import (
"fmt"
"reflect"
)
type AppInterface interface {
run() *App
}
@rming
rming / makefile
Created March 1, 2019 06:32 — forked from sohlich/makefile
# Go parameters
GOCMD=go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOGET=$(GOCMD) get
BINARY_NAME=mybinary
BINARY_UNIX=$(BINARY_NAME)_unix
@rming
rming / gist:73c5b7e516099a575b949241d08af691
Created March 4, 2019 02:03
Differences between reread, reload, restart, update?
Would the following definitions work for the documentation ?
reread - Reread supervisor configuration. Do not update or restart the running services.
update - Restart service(s) whose configuration has changed. Usually run after 'reread'.
reload - Reread supervisor configuration, reload supervisord and supervisorctl, restart services that were started.
restart - Restart service(s)
https://github.com/Supervisor/supervisor/issues/720#issuecomment-359222022
@rming
rming / removeJobsRedisDriver.php
Created March 22, 2019 06:06 — forked from derhansen/removeJobsRedisDriver.php
Laravel 5 - remove all jobs from a queue (redis driver)
Redis::connection()->del('queues:myqueue');
package main
import (
"bytes"
"fmt"
"regexp"
)
func main() {