duplicates = multiple editions
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
| sudo apt-get install libsnappy-dev | |
| wget https://leveldb.googlecode.com/files/leveldb-1.9.0.tar.gz | |
| tar -xzf leveldb-1.9.0.tar.gz | |
| cd leveldb-1.9.0 | |
| make | |
| sudo mv libleveldb.* /usr/local/lib | |
| cd include | |
| sudo cp -R leveldb /usr/local/include |
| public final class ResultFuture implements Future<Result> { | |
| private final CountDownLatch latch = new CountDownLatch(1); | |
| private Result value; | |
| @Override | |
| public boolean cancel(boolean mayInterruptIfRunning) { | |
| return false; | |
| } | |
| @Override |
| # requires socksify gem | |
| require "socksify" | |
| require 'socksify/http' | |
| # use w/ OAuth2 like OAuth2::Client.new(id, secret, connection_opts: { proxy: 'socks://127.0.0.1:9050' }) | |
| class Faraday::Adapter::NetHttp | |
| def net_http_class(env) | |
| if proxy = env[:request][:proxy] | |
| if proxy[:uri].scheme == 'socks' | |
| Net::HTTP::SOCKSProxy(proxy[:uri].host, proxy[:uri].port) |
| require 'eventmachine' | |
| require 'socket' | |
| require 'kgio' | |
| server = Kgio::TCPServer.new('0.0.0.0', 4242) | |
| module Dispatch | |
| def notify_readable | |
| io = @io.kgio_tryaccept or return | |
| EventMachine.attach(io, Server) |
| HTTP_STATUS_CODES = { | |
| 100 => 'Continue', | |
| 101 => 'Switching Protocols', | |
| 102 => 'Processing', | |
| 200 => 'OK', | |
| 201 => 'Created', | |
| 202 => 'Accepted', | |
| 203 => 'Non-Authoritative Information', | |
| 204 => 'No Content', | |
| 205 => 'Reset Content', |
| ################################# | |
| # | |
| # 本清单基于 ubuntu 12.04, | |
| # 下个 ubuntu 的 LTS | |
| # 发出来后,会相应更新这里的内容。我的目标是按步执行可以零错误完成安装。 | |
| # 注意,本文件只是一个清单,不是一个可以安全执行的脚本 | |
| # | |
| ################################# | |
| # create a linode,login as root, and create a common user for all the tasks |
| apache2 | |
| wget -c http://apache.dataguru.cn//httpd/httpd-2.4.12.tar.bz2 && tar -xjf | |
| .configure —prefix=/destination | |
| make && make install | |
| edit conf/httpd.conf | |
| bin/apachectl -k start | |
| MySQL | |
| wget -c http://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.23.tar.gz | |
| cmake -DCMAKE_INSTALL_PREFIX:PATH=/destination && make all install |
| # nginx.conf | |
| http { | |
| client_max_body_size 20M; #上传文件的大小 | |
| } | |
| ------------------------------------------------------------------------------------ | |
| #Nginx应用配置 | |
| upstream app-name { | |
| # 配置unicorn服务器器 | |
| server unix:/opt/app-name/tmp/sockets/unicorn.sock |