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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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 - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <pthread.h> | |
void * worker (void * o) { | |
int * p = NULL; | |
printf("%d\n", *p); | |
return NULL; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
set -e -x | |
BUILD_DIR='/tmp/llvm-clang' | |
INSTALL_DIR='~/local/opt/llvm-clang' | |
LLVM_VERSION='3.9.0' | |
DARWIN_VERSION='16.1.0' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python3 | |
import re | |
import shutil | |
import sys | |
import asyncio | |
class BaseParser(object): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "mozilla/StackWalk.h" | |
#include "nsPrintfCString.h" | |
// HACK forward declartion | |
extern "C" char* PrintJSStack(); | |
void JS_smprintf_free(char*); | |
#define DEBUG_STACK_PATH "/tmp/raw_stacks.txt" | |
namespace debug { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python3 | |
import asyncio | |
import json | |
import sys | |
import yaml | |
def main(args=None): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: debian/changelog | |
=================================================================== | |
--- debian/changelog (revision 14903) | |
+++ debian/changelog (working copy) | |
@@ -1,3 +1,9 @@ | |
+boost1.55 (1.55.0+dfsg-4.1~coroutine1) experimental; urgency=low | |
+ | |
+ * Enable coroutine shared library. | |
+ | |
+ -- Wei-Cheng Pan <[email protected]> Fri, 26 Jun 2015 04:34:46 +0000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python3 | |
import asyncio | |
import contextlib | |
async def ping(ip): | |
p = await asyncio.create_subprocess_exec('ping', '-c', '4', ip, stdout=asyncio.subprocess.PIPE) | |
async for line in p.stdout: | |
print(line) |
NewerOlder