Skip to content

Instantly share code, notes, and snippets.

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

wangxiaolei fatelei

:octocat:
Focusing
View GitHub Profile
@fatelei
fatelei / index.html
Created February 24, 2017 07:28
MpWzGo
<div class="images">
<img class="image" src="https://pic2.zhimg.com/v2-6aa9abffb2d52b8afe9af4cb4ba09db5.jpg"/>
<img class="image" src="https://pic2.zhimg.com/v2-6aa9abffb2d52b8afe9af4cb4ba09db5.jpg"/>
<img class="image" src="https://pic3.zhimg.com/v2-f5b2c99bc559e4d10b1ca1250bc1311a.jpg"/>
<img class="image" src="https://pic4.zhimg.com/v2-24c14572f54488a8c1fd7af38f7f8007.jpg"/>
<img class="image" src="https://pic4.zhimg.com/v2-24c14572f54488a8c1fd7af38f7f8007.jpg"/>
<img class="image" src="https://pic3.zhimg.com/v2-961a979bdead64c3f827c324879eff9a.jpg"/>
<img class="image" src="https://pic3.zhimg.com/v2-961a979bdead64c3f827c324879eff9a.jpg"/>
<img class="image" src="https://pic2.zhimg.com/v2-01a4709e70b13f9a59183e8029a23e41.jpg"/>
<img class="image" src="https://pic2.zhimg.com/v2-01a4709e70b13f9a59183e8029a23e41.jpg"/>
class override_func_params(object):
def __init__(self, *args, **kwargs):
self.override_args = args
self.override_kwargs = kwargs
def __call__(self, func):
def wrapper(*args, **kwargs):
if kwargs:
kwargs.update(self.override_kwargs)
if args:
# Path to Oh My Fish install.
set -gx OMF_PATH "$HOME/.local/share/omf"
# Load oh-my-fish configuration.
source $OMF_PATH/init.fish
# Plugins
set FISH_PLUGINS git
# set GOPATH
/data/logs/nginx/*.log {
su root root
daily
missingok
compress
delaycompress
rotate 10
sharedscripts
postrotate
[ -f /data/run/nginx.pid ] && kill -USR1 `cat /data/run/nginx.pid`
[supervisord]
logfile = /data/logs/supervisor/supervisord.log
logfile_maxbytes = 50MB
logfile_backups=10
loglevel = info
pidfile = /data/run/supervisord.pid
nodaemon = false
minfds = 1024
minprocs = 200
umask = 022
@fatelei
fatelei / tmux.md
Created August 19, 2016 02:51 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

input {
beats {
port => "5043"
}
}
filter {
if [type] == "broker" {
grok {
match => {
################### Filebeat Configuration Example #########################
############################# Filebeat ######################################
filebeat:
# List of prospectors to fetch data.
prospectors:
# Each - is a prospector. Below are the prospector specific configurations
# General filebeat configuration options
#
# -*- coding: utf8 -*-
import random
import string
def rand_str(length):
return ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(length))