easy_install的配置文件
修改文件 ~/.pydistutils.cfg为: [easy_install] index_url = https://pypi.tuna.tsinghua.edu.cn/simple
直接在setup.py的同目录放置一个setup.cfg: [easy_install] index_url = https://pypi.tuna.tsinghua.edu.cn/simple
package com.data; | |
public interface Animal { | |
public String getName(); | |
} | |
/**/ | |
class Cat implements Animal { |
easy_install的配置文件
修改文件 ~/.pydistutils.cfg为: [easy_install] index_url = https://pypi.tuna.tsinghua.edu.cn/simple
直接在setup.py的同目录放置一个setup.cfg: [easy_install] index_url = https://pypi.tuna.tsinghua.edu.cn/simple
##1. 高德地理编码
https://lbs.amap.com/api/webservice/guide/api/georegeo
地理编码/逆地理编码 API 是通过 HTTP/HTTPS 协议访问远程服务的接口,提供结构化地址与经纬度之间的相互转化的能力。
#!/usr/bin/python | |
# Ref: https://askubuntu.com/questions/219609/how-do-i-show-active-dhcp-leases | |
# /var/lib/dhcp/dhcpd.leases | |
import datetime, bisect | |
def parse_timestamp(raw_str): | |
tokens = raw_str.split() | |
if len(tokens) == 1: | |
if tokens[0].lower() == 'never': |
本教材适用于Ubuntu,Debian,Centos等大部分Linux By Tarivs
利用daocloud的安装脚本一键完成docker安装,详见https://get.daocloud.io/
curl -sSL https://get.daocloud.io/docker | sh
操作系统:windows10 将同一项目通过ssh提交到github.com 和 coding.net
生成ssh公钥
ssh-keygen -t rsa -b 4096 -C "[email protected]" -f ~/.ssh/id_rsa_coding
ssh-keygen -t rsa -b 4096 -C "[email protected]" -f ~/.ssh/id_rsa_github
实现301跳转 | |
server { | |
listen 80; | |
server_name example.org; | |
return 301 $scheme://$host$request_uri; | |
} | |
其中以下为nginx全局变量: | |
$scheme : HTTP方法,如http,https; | |
$host : 请求主机头字段,否则为服务器名称; | |
$request_uri : 包含请求参数的原始URI,不包含主机名,如:”/foo/bar.php?arg=abc”; |
1. Install Linux updates, set time zones, followed by GCC and Make | |
sudo yum -y update | |
sudo ln -sf /usr/share/zoneinfo/America/Indianapolis \ | |
/etc/localtime | |
sudo yum -y install gcc make | |
2. Download, Untar and Make Redis 2.8 (check here http://redis.io/download) |