This is a Chinese version of https://gist.github.com/1207002/86f48cd3b3b72c85e6293926cf7c730de03b2f08 from lucasfais
⌘T | 前往文件 |
⌘⌃P | 前往项目 |
⌘R | 前往 method |
⌘⇧P | 命令提示 |
This is a Chinese version of https://gist.github.com/1207002/86f48cd3b3b72c85e6293926cf7c730de03b2f08 from lucasfais
⌘T | 前往文件 |
⌘⌃P | 前往项目 |
⌘R | 前往 method |
⌘⇧P | 命令提示 |
import os | |
import re | |
import socket | |
import struct | |
def dns_resolve(host, dnsserver): | |
assert isinstance(host, basestring) and isinstance(dnsserver, basestring) | |
index = os.urandom(2) | |
hoststr = ''.join(chr(len(x))+x for x in host.split('.')) | |
data = '%s\x01\x00\x00\x01\x00\x00\x00\x00\x00\x00%s\x00\x00\x01\x00\x01' % (index, hoststr) |
#!/usr/bin/env python | |
import simplejson | |
import logging | |
import random | |
import re | |
import datetime | |
import string | |
import time | |
import sys | |
import urllib |
resolver 8.8.8.8; | |
location /video/ { | |
if ($request_uri ~ "^/video/(.+?)/.+") { | |
set $upstream_host $1.googlevideo.com; | |
add_header Content-Disposition "attachment; filename=video.mp4;"; | |
} | |
rewrite /video/.+?/(.+)$ /$1 break; | |
proxy_buffering off; | |
proxy_pass https://$upstream_host; | |
proxy_set_header Host $upstream_host; |
# Shell script to download Oracle JDK from command prompt / terminal. | |
# You can download all the binaries one-shot by just giving the BASE_URL. | |
## Features: | |
# Resumes a broken [previous] download, if any. | |
# Renames the file to a proper name with platform adding platform info. | |
# Downloads all the following from Oracle Website with one shell invocation. | |
# a. Windows 64 and 32 bit; | |
# b. Linux 64 and 32 bit; and | |
# c. API Docs. |
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --" |
#参考资料
###下载单个文件,默认将输出打印到标准输出中(STDOUT)中
curl http://www.centos.org
#!/bin/bash | |
apt-get update | |
wget http://luajit.org/download/LuaJIT-2.1.0-beta1.tar.gz | |
tar -xvf LuaJIT-2.1.0-beta1.tar.gz | |
cd LuaJIT-2.1.0-beta1 | |
make | |
sudo make install | |
wget -c https://openresty.org/download/openresty-1.9.7.4.tar.gz | |
tar zxvf openresty-1.9.7.4.tar.gz |