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 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
#!/usr/bin/env python | |
# encoding: utf-8 | |
import tornado.ioloop | |
import tornado.web | |
import tornado.log | |
import tornado.httpserver | |
from tornado.options import define, options | |
import logging | |
import tornado.gen |
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
require 'formula' | |
class Sshpass < Formula | |
url 'http://sourceforge.net/projects/sshpass/files/sshpass/1.06/sshpass-1.06.tar.gz' | |
homepage 'http://sourceforge.net/projects/sshpass' | |
sh256 'c6324fcee608b99a58f9870157dfa754837f8c48be3df0f5e2f3accf145dee60' | |
def install | |
system "./configure", "--disable-debug", "--disable-dependency-tracking", | |
"--prefix=#{prefix}" |
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 tornado.gen | |
import tornado.web | |
import tornado.ioloop | |
import tornado.httpclient | |
import tornado.tcpclient | |
class ProxyHandler(tornado.web.RequestHandler): | |
@tornado.gen.coroutine |
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
yum install -y boost boost-devel | |
yum install -y make gcc gcc-c++ kernel-devel python-devel | |
wget https://github.com/arvidn/libtorrent/releases/download/libtorrent-1_0_10/libtorrent-rasterbar-1.0.10.tar.gz | |
tar zxvf libtorrent-rasterbar-1.0.10.tar.gz | |
cd libtorrent-rasterbar-1.0.10.tar.gz | |
./configure --disable-debug --with-boost-libdir=/usr/lib64 --disable-encryption --enable-python-binding | |
make && make install | |
export LD_LIBRARY_PATH=/usr/local/lib/ | |
cd bindings/python | |
python setup.py build |
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
// 多说评论数目 | |
$(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
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
{ | |
"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 | |
} |