Skip to content

Instantly share code, notes, and snippets.

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

Jianghua.yjh yjhjstz

🏠
Working from home
View GitHub Profile
#include <boost/thread.hpp>
#include <boost/asio.hpp>
#include <memory>
#include <atomic>
#include <chrono>
#include <sys/resource.h>
using namespace boost::asio;
using namespace boost::asio::ip;
using namespace std::chrono;
using boost::system::error_code;
@yjhjstz
yjhjstz / client.cpp
Last active December 29, 2021 14:05
asio benchmark
#include <boost/thread.hpp>
#include <boost/asio.hpp>
#include <memory>
#include <atomic>
#include <chrono>
#include <sys/resource.h>
using namespace boost::asio;
using namespace boost::asio::ip;
using namespace std::chrono;
using boost::system::error_code;
@yjhjstz
yjhjstz / epoll.c
Last active October 19, 2016 03:48
poll test/ ET mode
#include <sys/socket.h>
#include <sys/epoll.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
Using worker: bluebox-linux-8.worker.travis-ci.org:travis-linux-12
git.1
$ git clone --depth=50 git://github.com/pconstr/irf.git pconstr/irf
Cloning into 'pconstr/irf'...
remote: Counting objects: 100, done.
remote: Compressing objects: 100% (68/68), done.
remote: Total 100 (delta 50), reused 78 (delta 28)
Receiving objects: 100% (100/100), 80.75 KiB, done.
Resolving deltas: 100% (50/50), done.
$ cd pconstr/irf
@yjhjstz
yjhjstz / proxy.txt
Created February 17, 2016 02:38
git/npm
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
@yjhjstz
yjhjstz / stacktrace.cc
Created January 28, 2016 09:22 — forked from bnoordhuis/stacktrace.cc
Decode C/C++ and V8 JS stack frames.
#include "v8.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <cxxabi.h>
#include <dlfcn.h>
using namespace v8;