Skip to content

Instantly share code, notes, and snippets.

View StephanDollberg's full-sized avatar

Stephan Dollberg StephanDollberg

View GitHub Profile
@StephanDollberg
StephanDollberg / gist:4156328
Created November 27, 2012 19:10
homebrew - building boost with c++11 and mpi error log
This file has been truncated, but you can view the full file.
Homebrew 0.9.3
/usr/local/bin/mpicc --version
/usr/local/bin/mpicxx --version
==> Downloading http://downloads.sourceforge.net/project/boost/boost/1.52.0/boost_1_52_0.tar.bz2
Already downloaded: /Library/Caches/Homebrew/boost-1.52.0.tar.bz2
/usr/bin/tar xf /Library/Caches/Homebrew/boost-1.52.0.tar.bz2
==> Downloading patches
/usr/bin/curl -f#LA Homebrew 0.9.3 (Ruby 1.8.7-358; Mac OS X 10.8.2) https://svn.boost.org/trac/boost/raw-attachment/ticket/7671/libcpp_c11_numeric_limits.patch -o 000-homebrew.diff
######################################################################## 100.0%
==> Patching
@StephanDollberg
StephanDollberg / gist:4954704
Last active December 13, 2015 18:19
Shows sign of from si(2x) * cos(2x) in matlab
figure;
% sizes
y_size = 1.5;
x_size = 2*pi;
% colors
cos_col = 'c';
si_col = 'b';
sign_col = 'r';
@StephanDollberg
StephanDollberg / parallel_find.cpp
Last active December 16, 2015 09:19
parallel_find using Intel TBB
#include <boost/range/irange.hpp>
#include <boost/range/algorithm.hpp>
#include <boost/accumulators/accumulators.hpp>
#include <boost/accumulators/statistics/stats.hpp>
#include <boost/accumulators/statistics/mean.hpp>
#include <boost/accumulators/statistics/median.hpp>
#include <tbb/parallel_for.h>
#include <tbb/blocked_range.h>
#include <tbb/task.h>
@StephanDollberg
StephanDollberg / gist:8596442
Created January 24, 2014 12:34
homebrew - error in llvm34 and llvm35
➜ ~ brew info llvm35
llvm35: HEAD
http://llvm.org/
Not installed
From: https://github.com/homebrew/homebrew-versions/commits/master/llvm35.rb
==> Dependencies
Required: gmp ✔, isl ✔, cloog ✔
Recommended: libffi ✔
==> Options
--all-targets
@StephanDollberg
StephanDollberg / gist:8645430
Created January 27, 2014 09:14
llvm34 and llvm35 fail to build
brew install llvm34 --with-asan --with-clang --with-libcxx --rtti
==> Downloading http://llvm.org/releases/3.4/llvm-3.4.src.tar.gz
Already downloaded: /Library/Caches/Homebrew/llvm34-3.4.tar.gz
==> Downloading http://llvm.org/releases/3.4/polly-3.4.src.tar.gz
Already downloaded: /Library/Caches/Homebrew/llvm34--polly-3.4.tar.gz
==> Downloading http://llvm.org/releases/3.4/clang-3.4.src.tar.gz
Already downloaded: /Library/Caches/Homebrew/llvm34--clang-3.4.tar.gz
==> Downloading http://llvm.org/releases/3.4/clang-tools-extra-3.4.src.tar.gz
Already downloaded: /Library/Caches/Homebrew/llvm34--clang-tools-extra-3.4.tar.gz
==> Downloading http://llvm.org/releases/3.4/compiler-rt-3.4.src.tar.gz
@StephanDollberg
StephanDollberg / gist:9324109
Created March 3, 2014 12:38
hammer -v template info --id
[inf@head foreman_version_control]$ hammer -v template info --id 1
[ INFO 2014-03-03 13:36:08 Init] Initialization of Hammer CLI (0.0.18) has started...
[ INFO 2014-03-03 13:36:08 Init] Configuration from the file /etc/foreman/cli_config.yml has been loaded
[ INFO 2014-03-03 13:36:08 Modules] Extension module hammer_cli_foreman (0.0.18) loaded
[ INFO 2014-03-03 13:36:08 HammerCLI::MainCommand] Called with options: {"option_verbose"=>true}
[ INFO 2014-03-03 13:36:08 HammerCLIForeman::Template] Called with options: {}
[ INFO 2014-03-03 13:36:08 HammerCLIForeman::Template::InfoCommand] Called with options: {"option_id"=>"1"}
[DEBUG 2014-03-03 13:36:08 Connection] Registered: foreman_ConfigTemplate
[DEBUG 2014-03-03 13:36:08 ForemanApi::Resources::ConfigTemplate] Calling 'show' with params {
"id" => "1"
@StephanDollberg
StephanDollberg / jwt auth example
Created February 12, 2015 09:15
jwt auth example
package main
import (
"github.com/ant0ine/go-json-rest/rest"
"log"
"net/http"
)
func handle_auth(w rest.ResponseWriter, r *rest.Request) {
w.WriteJson(map[string]string{"authed": r.Env["REMOTE_USER"].(string)})
@StephanDollberg
StephanDollberg / memcached
Last active September 30, 2016 13:25
twemproxy bench / DO 8 core machine
./clients/memslap -s 127.0.0.1:11211/20000 -S 5s -T 4 -c 200
twemcache direct
Get Statistics
Type Time(s) Ops TPS(ops/s) Net(M/s) Get_miss Min(us) Max(us) Avg(us) Std_dev Geo_dist
Period 5 637239 127447 132.2 143267 70 27985 1406 966.24 1239.16
Global 5 637239 127447 132.2 143268 70 27985 1406 966.24 1239.16
Set Statistics
Type Time(s) Ops TPS(ops/s) Net(M/s) Get_miss Min(us) Max(us) Avg(us) Std_dev Geo_dist
@StephanDollberg
StephanDollberg / .cpp
Created December 26, 2018 11:31
Prefault comparison
#include <benchmark/benchmark.h>
#include <absl/container/flat_hash_map.h>
#define BENCH_SIZES ->Arg(1000)->Arg(1000000)->Arg(10000000)
template <typename Map>
void fill_map(Map& map, const std::uint64_t size) {
for (std::uint64_t i = 0 ; i < size; ++i) {
map.try_emplace(i, i*2);
}
@StephanDollberg
StephanDollberg / no_prefault.svg
Created January 3, 2019 08:12
abseil raw_hash_map with/without prefaulting
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.