This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) 2013 ActiveState Software Inc. All rights reserved. | |
// TODO: | |
// * repeat all the tests with Poll:true | |
package tail | |
import ( | |
_ "fmt" | |
"io/ioutil" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
广州用 Go 的公司: | |
- [广州舜飞](http://www.sunteng.com/) | |
- [有米](https://www.youmi.net/) | |
- [UMBRELLA](http://www.umworks.com/) | |
- [酷狗](http://www.kugou.com/) | |
深圳用 Go 的公司: | |
- [超软科技](http://www.chaoruan.net/) | |
- [深圳名游](http://www.139game.cn/) | |
- [希品科技](https://www.v2ex.com/t/136605) // [公司网站](http://www.xipintech.com/) 打不开 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env bash | |
# start=$(echo 'remotes/origin/'|awk '{print length($1)}') | |
# 15 | |
git stash | |
git fetch -p | |
branches=`git branch -a|grep remotes/origin|grep -v HEAD|xargs -0 -I br echo br|awk '{print substr($1, 16, length($1))}'` | |
function rm_br { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# repository | |
cd /tmp | |
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
rpm -Uvh epel-release-6-8.noarch.rpm | |
# system update | |
yum -y update | |
yum -y groupinstall "Development Tools" | |
yum -y install libxslt-devel libyaml-devel libxml2-devel gdbm-devel libffi-devel zlib-devel openssl-devel libyaml-devel readline-devel curl-devel openssl-devel pcre-devel git memcached-devel valgrind-devel mysql-devel ImageMagick-devel ImageMagick |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
cat qq.txt |grep '^2[0-9]\{3\}-[0-9]\{2\}-[0-9]\{2\}\s[0-9]\{2\}:' |awk '{people[$3]++;count++}END { for (a in people) print people[a]" " people[a]/count*100 "% " a}' |column -c3 -s " " -t |sort -nr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
"regexp" | |
) | |
func main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding=utf-8 | |
import re | |
ucpage = """ | |
<div class="content" title="2013-07-25 09:09:58"> | |
要匹配的内容 | |
</div> | |
""" | |
pat = re.compile(r'<div.*?class="content".*?ti.*?>(.*?)</div>', re.S|re.M) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
cd /var/cache/pacman/pkg/ | |
pkgs=$(ls -lt |grep -E "*.pkg.tar.xz" |awk '{print $9}') | |
declare -A uniq | |
for pkg in $pkgs | |
do | |
name=$(echo $pkg |grep -o "^[a-zA-Z]\+[0-9]*\(-[a-zA-Z]\+[0-9]*\)*") | |
if [[ uniq[$name] -eq 1 ]]; then |