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
{ | |
"ENCRYPT_KEY": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", | |
"ENCRYPT_IV": "AAAAAAAAAAAAAAAA", | |
"WORKER_URL": "http://11.11.11.3:9998/worker", | |
"WORKER_WS_URI": "ws://11.11.11.3:9998/worker/", | |
"SUPERVISOR_PROCESS_NAME": "shadowsocks", | |
"SUPERVISOR_CTL_PORT": 4999, | |
"SUPERVISOR_CTL_HOST": "127.0.0.1", | |
"DEBUG": true | |
} |
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 ( | |
"flag" | |
"os/user" | |
"fmt" | |
"net/http" | |
go_path "path" | |
) |
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
// 多说评论数目 | |
$(function() { | |
var threads = []; // thread-key | |
$('.post-title a').each(function(){threads.push($(this).attr('href'))}); | |
if (threads.length > 0) { | |
var duoshuo_api = "https://api.duoshuo.com/threads/counts.jsonp"; | |
var params = { | |
short_name: "sub-domain", // sub-domain.duoshuo.com | |
threads: threads.join(',') | |
}; |
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://support.ghost.org/supported-node-versions/ | |
FROM node:4-slim | |
RUN groupadd user && useradd --create-home --home-dir /home/user -g user user | |
RUN apt-get update && apt-get install -y \ | |
ca-certificates \ | |
wget \ | |
--no-install-recommends && rm -rf /var/lib/apt/lists/* |
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
# deb http://mirrors.aliyun.com/ubuntu trusty main restricted | |
# deb http://mirrors.aliyuncs.com/ubuntu trusty main restricted | |
# deb http://mirrors.aliyun.com/ubuntu trusty-updates main restricted | |
# deb http://mirrors.aliyuncs.com/ubuntu trusty-updates main restricted | |
# deb http://security.ubuntu.com/ubuntu trusty-security main restricted | |
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to | |
# newer versions of the distribution. | |
deb http://mirrors.aliyun.com/ubuntu trusty main restricted |
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
class Application(tornado.web.Application): | |
def __init__(self): | |
tornado.web.Application.__init__(self, handlers, **settings) | |
self.db_session = db_session | |
self.redis = redis.StrictRedis() | |
self.session_store = RedisSessionStore(self.redis) | |
class BaseHandler(tornado.web.RequestHandler): |
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 ( | |
"container/list" | |
"fmt" | |
"log" | |
"net/http" | |
"strconv" | |
"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
FROM python:2 | |
RUN echo "deb http://mirrors.aliyun.com/debian/ jessie main non-free contrib" > /etc/apt/sources.list && \ | |
echo "deb http://mirrors.aliyun.com/debian/ jessie-proposed-updates main non-free contrib" >> /etc/apt/sources.list && \ | |
echo "deb-src http://mirrors.aliyun.com/debian/ jessie main non-free contrib" >> /etc/apt/sources.list && \ | |
echo "deb-src http://mirrors.aliyun.com/debian/ jessie-proposed-updates main non-free contrib" >> /etc/apt/sources.list && \ | |
apt-get update && apt-get install libcurl4-openssl-dev -y && \ | |
apt-get install git -y && \ | |
cd / && \ | |
git clone https://github.com/phith0n/Minos.git /code && \ |
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 qiniu | |
import ( | |
"bytes" | |
"context" | |
"encoding/base64" | |
"encoding/json" | |
"fmt" | |
"io" | |
"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
package main | |
import ( | |
"fmt" | |
"strconv" | |
) | |
func main() { | |
// a := map[string]interface{}{ | |
// "中文": map[string]interface{}{ |