Skip to content

Instantly share code, notes, and snippets.

View renyuntao's full-sized avatar
🌴
On vacation

YtRen renyuntao

🌴
On vacation
View GitHub Profile
@renyuntao
renyuntao / web-servers.md
Created June 12, 2018 07:22 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@renyuntao
renyuntao / my_site.conf
Created April 19, 2018 02:14 — forked from lixingcong/my_site.conf
nginx autoindex timezone setting
location ^~ /demo {
alias /var/www/demo/;
autoindex on;
# set to on means use localtime
autoindex_localtime on;
# show size with unit 'MB' instead of 'Byte'
autoindex_exact_size off;
}
--2017-09-19 16:32:25--  https://github.com/facebook/wdt/archive/v1.27.1612021.tar.gz
正在解析主机 github.com (github.com)... 192.30.255.112, 192.30.255.113
正在连接 github.com (github.com)|192.30.255.112|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 302 Found
位置:https://codeload.github.com/facebook/wdt/tar.gz/v1.27.1612021 [跟随至新的 URL]
--2017-09-19 16:32:27--  https://codeload.github.com/facebook/wdt/tar.gz/v1.27.1612021
正在解析主机 codeload.github.com (codeload.github.com)... 192.30.255.120, 192.30.255.121
正在连接 codeload.github.com (codeload.github.com)|192.30.255.120|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
@renyuntao
renyuntao / operate.c
Created May 25, 2017 07:35
标注杂色
// 一、库文件
#include<stdio.h>
#include<math.h>
int imgoffset;
char bmpheader[54];
int imgwidth;
int imgheight;
int bitperpixel;
int scanwidth;
@renyuntao
renyuntao / How to download streaming video
Created April 25, 2017 01:33 — forked from danfinlay/How to download streaming video.md
How to download a streaming video with Google Chrome
#How to download streaming video
Streaming just means a download that they don't want you to keep. But Chrome's developer tools make it easy to access what's really going on under the hood.
##Open Developer Tools
From the page where you want to download some things, go into your chrome menu to open the developer tools. You can either:
1. (On a mac): Command-option-J
2. (On a PC): Control-alt-J
@renyuntao
renyuntao / quicksort.cxx
Created November 17, 2015 01:02
Quick Sort
#include<iostream>
#include<ctime>
#include<random>
using std::cout;
using std::cin;
using std::endl;
int partition(int arr[],int low,int high)
{
int i = low + 1;
@renyuntao
renyuntao / fancynum.cxx
Created November 8, 2015 06:58
Fancy number
#include<iostream>
#include<cmath>
#include<string>
#include<set>
using std::endl;
using std::cout;
bool isFancyNum(int value)
{
std::set<char> st = {'0','1','6','8','9'};