Skip to content

Instantly share code, notes, and snippets.

View blastmaster's full-sized avatar
🐧
:wq

Sebastian Oeste blastmaster

🐧
:wq
  • Cyberspace
View GitHub Profile
fuck microsoft
@blastmaster
blastmaster / zip.cc
Last active March 25, 2019 14:11
simple zip implementation using std::transform
#include <iostream>
#include <vector>
#include <tuple>
#include <algorithm>
using namespace std;
template<typename T, typename U>
auto zip(const T& v1, const U& v2)
{
@blastmaster
blastmaster / bench.sh
Created December 21, 2017 10:26
auto submission for ior benchmark
#! /bin/bash
# what we should do here?
WORK=${1:?"nothing to do!"}
# create working dir if not exists,
if [ ! -d "$WORKING_DIR" ]; then
mkdir -p $WORKING_DIR
elif [ ! -r "$WORKING_DIR" -o ! -w "$WORKING_DIR" -o ! -x "$WORKING_DIR" ]; then
errcho "Error please check your premissions on $WORKING_DIR"
@blastmaster
blastmaster / copy_set.cc
Created November 17, 2017 11:57
try to copy a std::set
#include <iostream>
#include <set>
#include <algorithm>
#include <iterator>
int main()
{
std::set<int> v {1,2,3,4};
std::set<int> l;
@blastmaster
blastmaster / simple_graph_builder.hpp
Created July 20, 2017 11:33
build distributed graph from otf2 trace
#ifndef __RABBITXX_TRACE_SIMPLE_GRAPH_BUILDER_HPP__
#define __RABBITXX_TRACE_SIMPLE_GRAPH_BUILDER_HPP__
#include <rabbitxx/trace/base.hpp>
#include <rabbitxx/graph.hpp>
#include <rabbitxx/mapping.hpp>
#include <rabbitxx/log.hpp>
#include <otf2xx/definition/definitions.hpp>
#include <otf2xx/event/events.hpp>
@blastmaster
blastmaster / diff.patch
Created March 31, 2017 19:22
ln symlink patch
From eb0411a1bb62afc0fff0c8671c0d51a368f5c80f Mon Sep 17 00:00:00 2001
From: blastmaster <blastmaster@chelnok.de>
Date: Sat, 25 Mar 2017 01:02:53 +0100
Subject: [PATCH 1/2] ln: make symbolic links by default:
* This commit changes the default behavior of ln.
Instead of creating hard links the default will now
create symbolic links.
If you still want to create hard links the -h option is provided.
@blastmaster
blastmaster / CMakeLists.txt
Last active January 10, 2017 08:49
self registering abstract factory dynamic initialization
cmake_minimum_required(VERSION 3.2.2)
set(PROJECT_NAME "abstract factory")
set(PROJECT_VERSION 1.0)
project(${PROJECT_NAME} VERSION ${PROJECT_VERSION} LANGUAGES CXX)
set(AF_CXX_FLAGS "-Wall -g -std=c++14")
set(AF_SOURCES

Keybase proof

I hereby claim:

  • I am blastmaster on github.
  • I am blastmaster (https://keybase.io/blastmaster) on keybase.
  • I have a public key whose fingerprint is 270D AEB0 EC5A 129C E1F3 8E2F CB50 09A2 DB4C 5190

To claim this, I am signing this object:

@blastmaster
blastmaster / testopen.c
Created May 6, 2016 15:51
failed open on tmpfs
#include <stdio.h>
#include <unistd.h>
#include <sys/ioctl.h>
#define __USE_GNU
#include <fcntl.h>
#undef __USE_GNU
#include <sys/stat.h>
#include <sys/types.h>
int main(int argc, char** argv)
@blastmaster
blastmaster / symlistgen.py
Created March 11, 2016 16:43
Generate __all__ list for for wildcard imports of certain symbols
#! /usr/bin/env python2
import sys
import os.path
import string
import imp
import inspect
def print_help():