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 / gist:b44024199188fa44d41ac0b12533c7b5
Created July 4, 2016 08:09
git global ignore .idea folder
git gloablly ignore .idea folder of jetbrains
run this in cli :
git config --get core.excludesfile
I got this:
/Users/USERNAME/.gitignore_global
modify that file, add .idea/*
Lyrics for iTunes
https://martianz.cn/dynamiclyrics/
@slow-is-fast
slow-is-fast / gist:caea1c126ed6ff4c231dc22754ac090a
Created July 9, 2016 06:52
php call java apktool 中文乱码问题
- 文字编码
- 环境变量 (PHP执行环境可能和shell里的不一致,需要在调用exec之前设置)
putenv("PATH=/usr/local/oracel-java-1.8/bin"); // 设置PATH环境 --> in php code
exec(“export LANG=’en_US.UTF-8′;java xxx.jar…”); // 设置PHP环境语言
@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 / git-socks-proxy
Created July 9, 2016 07:42
setup git socks proxy
git config --global http.proxy 'socks5://127.0.0.1:1080'
@slow-is-fast
slow-is-fast / boom.md
Created July 13, 2016 01:26
Mac remove boom device
  1. Open Terminal.

  2. Type this: sudo kextunload -b com.globaldelight.driver.Boom2Device

  3. Enter your password when prompted.

@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 / 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 / gist:9e3542319dddd5d4bf10ce811b64e3c0
Created July 16, 2016 04:55
mysql remove duplicate rows with one left
DELETE n1 FROM TABLE n1, fb_download_records n2 WHERE n1.id > n2.id AND n1.column = n2.column and ....
@slow-is-fast
slow-is-fast / mac_build_php.md
Created July 20, 2016 02:08
Mac Build PHP Source Cloned From Github

Mac Build PHP Source Cloned From Github

  • cd xxx
  • git clone https://github.com/php/php-src php-src
  • cd php-src
  • brew install autoconf
  • brew install re2c
  • brew install bison

    (setup PATH: /usr/local/Celler/bison/x.x.x/ before /usr/bin)

  • ./buildconf