Skip to content

Instantly share code, notes, and snippets.

View legnaleurc's full-sized avatar

Wei-Cheng Pan legnaleurc

View GitHub Profile
#include <stdio.h>
#include <pthread.h>
void * worker (void * o) {
int * p = NULL;
printf("%d\n", *p);
return NULL;
}
@legnaleurc
legnaleurc / stream.cgi
Last active July 26, 2017 05:10
streaming PoC
#! /bin/sh
echo 'Content-Type: video/mp4'
echo
ffmpeg -i 'rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov' -c:v copy -c:a copy -f mp4 -movflags frag_keyframe+empty_moov -
@legnaleurc
legnaleurc / git2hg.md
Last active January 12, 2018 06:14
Mercurial Cheatsheet
git mercurial
git log hg log -f
git remote show hg incoming
git remote update hg pull
git branch hg bookmarks
git checkout $commit_id hg update $changeset_id
git add -p
git commit
hg commit -i
git rebase -i $commit_id hg histedit $changeset_id
#! /usr/bin/env python3
import asyncio
from concurrent.futures import ThreadPoolExecutor
import requests
import sys
def background_task():
rv = requests.get('https://httpbin.org/get')