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
import ( | |
"fmt" | |
"github.com/xiocode/rss" | |
"io/ioutil" | |
"net/http" | |
// "runtime" | |
"sync" | |
"time" | |
) |
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
Assertions: | |
- I'm not stupid | |
- I don't want to be limited by some idiotic `people that write templates are stupid` rule. | |
- I don't want to learn yet another template language. | |
- I want to use golang expressions if, for.. | |
- I want all the power of indexing, getting attributes and performing operations that golang offers. | |
- I want to type less stuff and do more. | |
- I want to include other templates in my template. (jinja?) | |
- I want to extend templates. |
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 ( | |
"crypto" | |
"crypto/rsa" | |
"crypto/sha1" | |
"crypto/x509" | |
"encoding/base64" | |
"fmt" | |
) |
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 ( | |
"fmt" | |
"labix.org/v2/mgo" | |
"labix.org/v2/mgo/bson" | |
"time" | |
) | |
type Person struct { |
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
{ | |
"hasvisible": false, | |
"marks": [], | |
"next_cursor": 0, | |
"previous_cursor": 0, | |
"statuses": [ | |
{ | |
"attitudes_count": 10, | |
"comments_count": 14, |
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
# Path to your oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="ys" | |
# Example aliases |
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
wget http://ftp.postgresql.org/pub/source/v9.3.1/postgresql-9.3.1.tar.gz | |
tar -xvf postgresql-9.3.1.tar.gz | |
yum install readline-devel zlib-devel gcc | |
cd postgresql-9.3.1 | |
./configure |
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
http://huoding.com/2012/01/19/142 关于timewait的解决方案 |
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
/etc/security/limits.conf: | |
* - nofile 65535 | |
* - memlock unlimited | |
/etc/elasticsearch/elasticsearch.yml: | |
index.number_of_shards: 5 | |
index.number_of_replicas: 0 | |
bootstrap.mlockall: true | |
vi ~/.bashrc |
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
1、依赖Java,Python | |
2、安装zookeeper | |
wget http://apache.dataguru.cn/zookeeper/current/zookeeper-3.4.5.tar.gz | |
tar -xvf zookeeper-3.4.5.tar.gz | |
cp -R zookeeper-3.4.5 /usr/local/ | |
ln -s /usr/local/zookeeper-3.4.5/ /usr/local/zookeeper | |
vi ~/.bashrc | |
追加: | |
export ZOOKEEPER_HOME="/usr/local/zookeeper" |