Skip to content

Instantly share code, notes, and snippets.

View hongqn's full-sized avatar
🏠
Working from home

Qiangning Hong hongqn

🏠
Working from home
View GitHub Profile
memblaze800G-16k-128.fio: read : io=1431.2MB, bw=1369.6MB/s, iops=87650, runt= 1045msec
memblaze800G-16k-128.fio: write: io=154096KB, bw=147460KB/s, iops=9216, runt= 1045msec
memblaze800G-16k-144.fio: read : io=212464KB, bw=1242.5MB/s, iops=79514, runt= 167msec
memblaze800G-16k-144.fio: write: io=25136KB, bw=150515KB/s, iops=9407, runt= 167msec
memblaze800G-16k-16.fio: read : io=430726MB, bw=735103KB/s, iops=45943, runt=600002msec
memblaze800G-16k-16.fio: write: io=48089MB, bw=82072KB/s, iops=5129, runt=600002msec
memblaze800G-16k-32.fio: read : io=619934MB, bw=1033.3MB/s, iops=66126, runt=600002msec
memblaze800G-16k-32.fio: write: io=69334MB, bw=118330KB/s, iops=7395, runt=600002msec
memblaze800G-16k-64.fio: read : io=791242MB, bw=1318.8MB/s, iops=84398, runt=600002msec
memblaze800G-16k-64.fio: write: io=88578MB, bw=151173KB/s, iops=9448, runt=600002msec
@hongqn
hongqn / odd.go
Last active January 2, 2016 11:19
genOdd := func() chan int {
ch := make(chan int)
go func() {
i := 1
for {
ch <- i
i += 2
}
}()
return ch
$ PORTAGE_CONFIGROOT=$EPREFIX crossdev --target armv6j-hardfloat-linux-gnueabi -v --b 2.23
-----------------------------------------------------------------------------------------------
* crossdev version: b3c18b8f7ee1c0d7cfeac08f4a8c22cf667116b1
* Host Portage ARCH: x64-macos
* Target Portage ARCH: arm
* Target System: armv6j-hardfloat-linux-gnueabi
* Stage: 4 (C/C++ compiler)
* ABIs: default
* binutils: binutils-2.23
$ ACCEPT_KEYWORDS="**" emerge "=app-admin/eselect-9999" -vat
These are the packages that would be merged, in reverse order:
Calculating dependencies... done!
[ebuild U ] app-admin/eselect-9999::gentoo [1.3.3::gentoo_prefix] USE="-doc" 0 kB
Total: 1 package (1 upgrade), Size of downloads: 0 kB
Would you like to merge these packages? [Yes/No]
@hongqn
hongqn / main.py
Created December 17, 2012 06:01
Template for main.py If you use vim, you can use https://github.com/aperezdc/vim-template or https://github.com/mattn/zencoding-vim to create it whenever you need a main script in python.
import sys
import logging
import argparse
def main(args):
pass
if __name__ == '__main__':
parser = argparse.ArgumentParser(
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
$ curl -v https://www.douban.com/service/auth2/token
* About to connect() to www.douban.com port 443 (#0)
* Trying 211.147.4.31... connected
* successfully set certificate verify locations:
* CAfile: none
CApath: /gentoo/etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server key exchange (12):
@hongqn
hongqn / gist:1758954
Created February 7, 2012 10:17
A benchmark tool in eventlet
#!/usr/bin/env python
# encoding: UTF-8
"""DoubanServiceBench"""
__author__ = "Qiangning Hong <hongqn@gmail.com>"
__version__ = "$Revision: 51434 $"
__date__ = "$Date: 2010-11-17 17:44:38 +0800 (Wed, 17 Nov 2010) $"
import sys