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
忘记地址,请发email索取: | |
getsisurl#gmail.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
#include <iostream> | |
#include <string> | |
#include <array> | |
#include <boost/asio.hpp> | |
#include <arpa/inet.h> | |
using boost::asio::ip::tcp; | |
int 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
# -*- coding: utf-8 -*- | |
import arrow | |
import MySQLdb | |
db = MySQLdb.connect( | |
host='127.0.0.1', | |
port=3306, | |
user='root', | |
passwd='root', |
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/bash | |
apt-get install build-essential | |
apt-get install libpcre3-dev | |
apt-get install libssl-dev | |
apt-get install libmysqld-dev | |
apt-get install libncurses5-dev | |
apt-get install libreadline-dev | |
apt-get install python-dev | |
apt-get install python-pip |
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/bash | |
apt-get install build-essential | |
apt-get install libpcre3-dev | |
apt-get install libssl-dev | |
apt-get install python-dev | |
apt-get install libmysqld-dev | |
apt-get install libncurses5-dev | |
apt-get install libreadline-dev | |
apt-get install python-pip |
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/bash | |
DAYS=3650 | |
# example: http://svn.red-bean.com/repos/main/3bits/servercert_3bits.txt | |
# 1 Create a Certifying Authority (CA) keypair. | |
# ca.crt / ca.key | |
# a. generate key |
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
syntax on | |
set nocompatible | |
set expandtab | |
set tabstop=4 | |
set shiftwidth=4 | |
set softtabstop=4 | |
set cindent | |
set ignorecase |
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 gevent | |
from gevent.event import Event | |
from gevent import subprocess | |
from gevent import signal as gevent_signal | |
import os | |
import sys | |
import signal | |
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
-module(fibo). | |
-export([start/1]). | |
-vsn(1.1). | |
start(Num) -> | |
ResultList = start(Num, 0, []), | |
Result = lists:sum(ResultList), | |
io:format("~p~n", [ResultList]), | |
io:format("~p~n", [Result]), | |
ok. |
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
def fibo(n): | |
if n == 0: | |
return 0 | |
x = [0, 1] | |
if n < 2: | |
return sum(x) | |
for i in range(2, n): | |
x.append( x[i-1] + x[i-2] ) |
NewerOlder