Skip to content

Instantly share code, notes, and snippets.

location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
etag off; #关闭etag
expires 1d; #有效期一天
# expires的单位可以使用
# ms: 毫秒
# s: 秒
# m: 分钟
# h: 小时
# d: 天
# w: 星期

环境介绍

在整个贡献代码过程中,应该牢记以下几个环境。其实绝大部分的操作都是在我们的本地电脑完成。  

- 别人的github项目A: https://github.com/rwx------/zabbix-templates  
- 我的github账号B:   https://github.com/RickieL  
- 我的本地电脑C:      local  

后面的介绍中,每个步骤的操作环境都会以[A]、[B]、[C]来标示。
@RickieL
RickieL / benchmark-commands.txt
Last active August 1, 2016 12:40 — forked from jkreps/benchmark-commands.txt
Kafka Benchmark Commands
Producer
Setup
bin/kafka-topics.sh --zookeeper hdp-241:2181 --create --topic test-rep-one --partitions 6 --replication-factor 1
bin/kafka-topics.sh --zookeeper hdp-241:2181 --create --topic test --partitions 6 --replication-factor 3
Single thread, no replication
bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test7 50000000 100 -1 acks=1 bootstrap.servers=hdp-241:9092 buffer.memory=67108864 batch.size=8196
@RickieL
RickieL / git-commit-rm.sh
Created July 21, 2016 12:17
commit the file that rm by none git
#!/bin/bash
# 环境 CentOS 7.2
# 统一语言环境,方便后面的匹配
export LANG=en_US.UTF-8
# 标记个时间吧^_^
DateTime=$(date +"%F %T")
Timestamp=$(date +"%s")
@RickieL
RickieL / launch-nmp.sh
Last active July 18, 2022 03:38 — forked from un1ko85/new_gist_file.sh
Starting and stopping NginX / MySQL / PHP-FPM on Mac OS X
#!/usr/local/bin/zsh
DirConf="/usr/local/etc"
PIDPATH="/usr/local/var/run"
PHPVersion="5.6"
MYSQL="/usr/local/bin/mysql.server"
NGINX="/usr/local/bin/nginx"
PHPFPM="/usr/local/sbin/php-fpm"
MEMCACHED="/usr/local/bin/memcached -m 24 -P $PIDPATH/memcached.pid -u root"
@RickieL
RickieL / bcp
Created February 29, 2012 01:09
rapid cp the file and directory in the same directory with an uniq name. useful for backup a file and directory.
#!/bin/sh
#############################
# For: backup a file with a uniq name
# Usage: bcp file_or_dir
# Create: Rickie Liao <rickie622 at gmail.com>
# Version: v0.01 create 2012-02-28
##########################################################
# Usage:
# bcp [-h|--help] [-V|--version]