Skip to content

Instantly share code, notes, and snippets.

sehe / Makefile
Created March 17, 2014 23:30
slurping ideone API
mcs *.cs -r:System.Web.Services -out:$@
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 / 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
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 / test.cpp
Last active August 29, 2015 14:09
#define NDEBUG
// 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>
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -2
ConstructorInitializerIndentWidth: 8
AlignEscapedNewlinesLeft: false
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: true
#include <cassert>
#include <iostream>
template<typename T, typename R=void>
struct ExtMethod {
ExtMethod& operator - () {
return *this;
template<typename U>
all:perfect perfect.S trie-spirit trie-spirit.S naive naive.S bitset bitset.S
all: switch switch.S jerry jerry.S decision_tree decision_tree.S
all: orlp orlp.S
all: orlp2 orlp2.S
all: orlp3 orlp3.S
all: orlp4 orlp4.S
CPPFLAGS+=-std=c++11 -Wall -pedantic
sehe /
Created September 10, 2011 14:54
Git is_submodule function
cat >> /dev/null <<"HERE"
Looking good. There is a bug in
for line in $submodules; do cd "$parent_git/$line"; \
if [[ `pwd` = $_git_dir ]]; then return 0; fi; \
because it won't cd back (so it would only work if the first submodule
digraph G {
graph [layout=dot/*circo*/ rankdir=TB];
{ rank=same; a->b->c->d; }
{ rank=same; e->f->g->h; }
{ rank=same; i->j->k->l; }
{ a; c; d } -> { e; f; } // [label="3"]