AutoProxy 代理规则
- 查看
- 修订版本
Posted in
- AutoProxy
- gfwList
- Rule
| #!/bin/bash | |
| export fan=$1 | |
| export an=$2 | |
| export ae=$3 | |
| git filter-branch -f --commit-filter ' | |
| if [ "$GIT_AUTHOR_NAME" = "$fan" ]; | |
| then | |
| GIT_COMMITTER_NAME="$an"; |
| package Minify; | |
| use nginx; | |
| use JavaScript::Minifier qw(minify); | |
| sub handler { | |
| my $r=shift; | |
| my $cache_dir="/tmp"; | |
| my $cache_file=$r->uri; | |
| $cache_file=~s!/!_!g; | |
| $cache_file=$r->header_in("Host").$cache_file; |
| repos for i in (find . -type d -a -name .git -exec dirname '{}' \; | sed "s|./||"); echo $i; pushd $i; git log -1 --pretty=format:' %ci %s%n%n'; popd; end |
| git log '@{1 weeks ago}..HEAD' --shortstat --pretty=format:%an | awk '/.+/ { | |
| if($2 != "file" && $3 != "changed,") { | |
| curr = $1 | |
| } else { | |
| files[curr]+=$1 | |
| inserts[curr]+=$4 | |
| deletes[curr]+=$6 | |
| } | |
| } | |
| END { |
AutoProxy 代理规则
Posted in
| #!/usr/bin/env bash | |
| updir=. | |
| todir=target/dir | |
| excludes=' | |
| upload.sh | |
| TODO.md | |
| node_modules* | |
| package.json |
| // many many codes | |
| document.write('foo bar'); | |
| document.write('</div>'); | |
| // new code | |
| var a = 'bar.js', stamp = +new Date() + '='; | |
| document.write('<script id="foo" src="' + a + '?' + stamp + '"></script>'); | |
| // other code | |
| document.write('<div> other text</div>'); |
| import java.io.BufferedReader; | |
| import java.io.BufferedWriter; | |
| import java.io.File; | |
| import java.io.FileReader; | |
| import java.io.FileWriter; | |
| import java.io.PrintWriter; | |
| import java.util.BitSet; | |
| public class PhoneNumber { | |
| public static void main(String[] args) throws Exception { |
| // 按键事件处理工具,直接调用将返回一个工具实例,e参数是event参数,对于ie是window.event,对于ff是callback的第一个参数 | |
| // 需要注意ie下keypress不会因Backspace Delete Home End 方向键而触发,但是会因Esc Enter键而触发keypress事件 | |
| // ff下始终会触发,这里charCode和keyChar也因此而起 | |
| function keyPressUtil(e) { | |
| if (this instanceof arguments.callee) { | |
| this.__event = e; | |
| } else { | |
| return new arguments.callee(e); | |
| } | |
| } |