Skip to content

Instantly share code, notes, and snippets.

View hechen0's full-sized avatar
🎯
Focusing

何晨 hechen0

🎯
Focusing
View GitHub Profile
#EXTM3U x-tvg-url="https://live.fanmingming.com/e.xml" catchup="append" catchup-source="?playseek=${(b)yyyyMMddHHmmss}-${(e)yyyyMMddHHmmss}"
#EXTINF:-1 tvg-id="CCTV1" tvg-name="CCTV1" tvg-logo="https://live.fanmingming.com/tv/CCTV1.png" group-title="央视频道",CCTV-1 综合
http://[2409:8087:7000:20::4]:80/dbiptv.sn.chinamobile.com/PLTV/88888888/224/3221226231/index.m3u8
#EXTINF:-1 tvg-id="CCTV2" tvg-name="CCTV2" tvg-logo="https://live.fanmingming.com/tv/CCTV2.png" group-title="央视频道",CCTV-2 财经
http://[2409:8087:7001:20:3::6]:80/dbiptv.sn.chinamobile.com/PLTV/88888888/224/3221226195/index.m3u8
#EXTINF:-1 tvg-id="CCTV3" tvg-name="CCTV3" tvg-logo="https://live.fanmingming.com/tv/CCTV3.png" group-title="央视频道",CCTV-3 综艺
http://[2409:8087:7001:20:3::7]:80/dbiptv.sn.chinamobile.com/PLTV/88888888/224/3221226397/index.m3u8
#EXTINF:-1 tvg-id="CCTV4" tvg-name="CCTV4" tvg-logo="https://live.fanmingming.com/tv/CCTV4.png" group-title="央视频道",CCTV-4 中文国际
http://[2409:8087:7000:20::204]:80/dbiptv.sn.chinamobile.com/PLTV/88888888/224/3
@hechen0
hechen0 / select.c
Created March 21, 2020 09:25
select_example
#include <stdio.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#define TIMEOUT 5 /* select timeout in seconds */
#define BUF_LEN 1024 /* read buffer in bytes */
int main (void) {
struct timeval tv;
@hechen0
hechen0 / poll.c
Created March 21, 2020 09:41
poll example
#include <stdio.h>
#include <unistd.h>
#include <poll.h>
#define TIMEOUT 5 /* poll timeout, in seconds */
int main (void) {
struct pollfd fds[2];
int ret;
/* watch stdin for input */
fds[0].fd = STDIN_FILENO;
fds[0].events = POLLIN;
tttt tttt iiii
ttt:::t ttt:::t i::::i
t:::::t t:::::t iiii
t:::::t t:::::t
ttttttt:::::ttttttt eeeeeeeeeeee ssssssssss ttttttt:::::ttttttt iiiiiiinnnn nnnnnnnn ggggggggg ggggg
t:::::::::::::::::t ee::::::::::::ee ss::::::::::s t:::::::::::::::::t i:::::in:::nn::::::::nn g:::::::::ggg::::g
t:::::::::::::::::t e::::::eeeee:::::eess:::::::::::::s t:::::::::::::::::t i::::in::::::::::::::nn g:::::::::::::::::g
tttttt:::::::tttttt e::::::e e:::::es::::::ssss:::::stttttt:::::::tttttt i::::inn:::::::::::::::ng::::::ggggg::::::gg
@hechen0
hechen0 / yuntiserver.rb
Created January 28, 2016 15:33
pick the fastest server from cloudtizi.com
PING_COUNT = 3
LATENCY_STATUS = /^round-trip min\/avg\/max\/stddev = [\d.]+\/([\d.]+)\/[\d.]+\/[\d.]+ ms/
def ping(host)
p "pinging... #{host}"
cmd = "ping -c #{PING_COUNT} #{host}"
`#{cmd}`
end
@hechen0
hechen0 / webcrawler.js
Created December 1, 2013 09:05
first to create web crawler with node js
var http = require('http'),
cheerio = require('cheerio');
startUrl = 'http://www.renren.com';
var urls = [startUrl];
var tags = ["div","h1","h2","h3","h4","h5","img","a"]
// Utility function that downloads a URL and invokes callback
@hechen0
hechen0 / loopCrawler.js
Created December 1, 2013 09:10
crawl two url using for loop , poor
function download(url, callback){
http.get(url, function(res){
var data="";
res.on('data', function(chunk){
data += chunk;
});
res.on('end', function(){
callback(data);
First, I am so fascinated by puzzle-solving just as Holmes does. As a detective, Holmes is the Master puzzle-solver, and he makes it a science and then reveals so well how he does it.
Second, Holmes shows us life as we wish it could be. Would that all our own problems could be solved by this great intellect, or that today's crimes could be approached with such scientific diligence and care. His work helps us to maintain a sense of fairness always. In a world in which evil often trumphs over good and evildoers get away with more than murder, this ideal is a cherished one indeed.
Harry Potter is the last book you should miss. For those who refuse to give Harry Potter a chance, here is my ammunition to turn them on to the Wizarding World.
First, let me remind you, J.K, Rowling is a BILLIONAIRE, richer than the queen of UK, just because she wrote seven children's novels. It shows how popular and great the book is, Plain and simple, the books tell a great story. It's epic, especially for a children's series, but it's not terribly long.
Second, it is so educational. Children's books are supposed to be tools for teaching and yet too many of them beat the kids over their heads with their message. Most kids widh they had magic to take care of their problems. Harry Potter teaches kids that life is rough(and won't be all sugar plums and fairy tales, even if you do have magic spells to clean your root)Let's be honest, how many children's books and movies will start off with the main characters parents being murdered in the first chapter of the first book?Life is like that, and that's the reas