Skip to content

Instantly share code, notes, and snippets.

#include <cassert>
#include <iostream>
template<typename T, typename R=void>
struct ExtMethod {
ExtMethod& operator - () {
return *this;
}
template<typename U>
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -2
ConstructorInitializerIndentWidth: 8
AlignEscapedNewlinesLeft: false
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: true
@sehe
sehe / test.cpp
Last active August 29, 2015 14:09
#define NDEBUG
#define FLAT_TAILORED
#define FLYWEIGHT
// MIC stuff
#include <boost/multi_index_container.hpp>
#include <boost/multi_index/member.hpp>
#include <boost/multi_index/random_access_index.hpp>
#include <boost/multi_index/ordered_index.hpp>
#include <boost/multi_index/hashed_index.hpp>
@sehe
sehe / test.cpp
Last active August 29, 2015 14:09
flat table with multiple indices
#include <boost/multi_index_container.hpp>
#include <boost/multi_index/ordered_index.hpp>
#include <boost/multi_index/member.hpp>
#include <boost/multi_index/composite_key.hpp>
namespace bmi = boost::multi_index;
struct VersionRecord {
int m_subdeliveryGroupId;
int m_retargetingId;
@sehe
sehe / quick demo
Created April 30, 2014 18:33
using notes to provide pull-notifications
demo:/tmp$ mkdir DEMO && cd DEMO && git init . && touch a && git add a && git commit -am 'initial'
Initialized empty Git repository in /tmp/DEMO/.git/
[master (root-commit) 29fa231] initial
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 a
demo:/tmp/DEMO$ for a in first second third fourth fifth sixth; do echo $a>a; git commit -am "$a commit"; done
[master 6cca37e] first commit
I wasn't first to get the key. Nor was I second, third, or even fourth. I'm probably not even the
10th to get it (ok, looks like I was the 7th.) But I'm happy that I was able to prove to myself
that I too could do it.
First, I have to admit I was a skeptic. Like the handful of other dissenters, I had initially
believed that it would be highly improbable under normal conditions to obtain the private key
through exploiting Heartbleed. So this was my motivation for participating in Cloudflare's
challenge. I had extracted a lot of other things with Heartbleed, but I hadn't actually set out to
extract private keys. So I wanted to see first-hand if it was possible or not.
@sehe
sehe / .gitignore
Last active August 22, 2017 08:39
asio multichannel demo
*~
.*~
.*.swp
*.o
test
run_client
run_server
@sehe
sehe / Makefile
Created March 17, 2014 23:30
slurping ideone API
slurp.exe:
mcs *.cs -r:System.Web.Services -out:$@
@sehe
sehe / Makefile
Last active January 16, 2023 08:29
Boost shared memory lockfree circular buffer queue
all:consumer producer
CPPFLAGS+=-std=c++03 -Wall -pedantic
CPPFLAGS+=-g -O0
CPPFLAGS+=-isystem ~/custom/boost/
LDFLAGS+=-L ~/custom/boost/stage/lib/ -Wl,-rpath,/home/sehe/custom/boost/stage/lib
LDFLAGS+=-lboost_system -lrt -lpthread
%:%.cpp
@sehe
sehe / .gitignore
Last active July 8, 2020 11:07
converting regular expressions to dot graphs (with boost spirit)
*.o
a.out
test
.*.swp
*~
*.png
tags