Skip to content

Instantly share code, notes, and snippets.

View slow-is-fast's full-sized avatar

slow-is-fast slow-is-fast

View GitHub Profile
@slow-is-fast
slow-is-fast / validation.php
Created October 16, 2016 08:59 — forked from chareice/validation.php
Localization Validation Message For Chineses With Laravel 5
<?php
use Symfony\Component\Yaml\Yaml;
return Yaml::parse(file_get_contents(base_path().'/resources/lang/zh_cn/validation.yml'));
@slow-is-fast
slow-is-fast / nginxvarcore.md
Created July 16, 2016 03:27 — forked from esfand/nginxvarcore.md
Nginx Variables

Embedded Variables

The ngx_http_core_module module supports embedded variables with names matching the Apache Server variables. First of all, these are variables representing client request header fields, such as $http_user_agent, $http_cookie, and so on. Also there are other variables:

  • $arg_name
    argument name in the request line
@slow-is-fast
slow-is-fast / counting_nginx.py
Created July 15, 2016 14:15 — forked from orangle/counting_nginx.py
使用nginx post_action参数来统计文件下载情况,从而统计用户下载文件完整性
#!/usr/bin/python
#-*- coding:utf-8 -*-
############################
#File Name: counting_file.py
#Author: orangleliu
#Mail: orangleliu@gmail.com
#Created Time: 2015-03-11 16:41:05
#License: MIT
############################
'''
@slow-is-fast
slow-is-fast / agnoster.md
Created July 9, 2016 07:38 — forked from petres/agnoster.md
Zsh (oh-my-zsh) Agnoster Theme Adaption for SVN

Agnoster Adaption

The SVN plugin of the oh-my-zsh ZSH distribution is not working with the agnoster theme, because it's simple not used in the prompt of the theme. Here two adaption of the theme file (themes/agnoster.zsh-theme) are listed, which are showing a nice prompt when you are in a SVN working directory.

  • Using the SVN plugin (with dirty symbol)
prompt_svn() {
  local rev branch
  if in_svn; then
@slow-is-fast
slow-is-fast / 佛祖保佑,哈哈
Created June 6, 2016 05:50 — forked from tailnode/佛祖保佑,哈哈
佛祖保佑,永不宕机,永无bug
//
// _oo8oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/'==='\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||_ \