Skip to content

Instantly share code, notes, and snippets.

Avatar

Lorenz Hübschle-Schneider lorenzhs

View GitHub Profile
@lorenzhs
lorenzhs / numa_array.hpp
Last active Feb 8, 2021
Arrays that are transparently distributed onto multiple NUMA nodes using Silo (https://github.com/stanford-mast/Silo) and make use of transparent hugepages, with a fallback for non-NUMA systems
View numa_array.hpp
/*******************************************************************************
* numa_array.hpp
*
* Arrays that are transparently distributed onto multiple NUMA nodes using Silo
* (https://github.com/stanford-mast/Silo) and make use of transparent huge
* pages, with a fallback for non-NUMA systems
*
* Copyright (C) 2018 Lorenz Hübschle-Schneider <lorenz@4z2.de>
*
* All rights reserved. Published under the BSD-2 license.
@lorenzhs
lorenzhs / ox-bibtex-example.txt
Last active Jul 9, 2018
Example of using ox-bib
View ox-bibtex-example.txt
#+TITLE: Org Bibtex Example
#+AUTHOR: Lorenz Hübschle-Schneider
#+OPTIONS: toc:nil
#+OPTIONS: ':t
* Introduction
Citing is as easy as inserting a reference: [[cite:BoundedDiff1989]]
Using =ox-extra='s =:ignore:= property allows using an unnumbered bibliography
View tweetscam.py
#!/usr/bin/env python3
# encoding: utf-8
# author: Lorenz Hübschle-Schneider
# This is really really simple. Twitter, you have no excuse for not doing something like this!
import codecs
import json
import re
from unicodedata import normalize
View just_let_me_select_a_language,_github.cpp
Reading symbols from /opt/intel/compilers_and_libraries_2016.3.210/linux/bin/intel64/icc...(no debugging symbols found)...done.
[New LWP 31279]
[New LWP 31303]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `icc -std=c++14 -Wall -Wextra -Werror -g -IDistributedSampling/lib -IDistributed`.
Program terminated with signal SIGABRT, Aborted.
#0 0x00007f5f5a2f31c8 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
[Current thread is 1 (Thread 0x7f5f5b7aa740 (LWP 31279))]
@lorenzhs
lorenzhs / style.css
Created Feb 16, 2016
Glowing Bear unread count style
View style.css
/* adapted from https://github.com/20after4/glowing-bear/commit/931eb1166a2de2a1f0dd196e6ebca63920c7e432 */
#sidebar .badge {
border-radius: 5px;
padding: 3px 5px;
border: 1px inset rgba(20,40,60,0.4);
box-shadow: none;
}
View serviceworker_fail.js
// File needs to be stored in the root of the app.
this.addEventListener('install', function(event) {
event.waitUntil(
caches.open('v1').then(function(cache) {
return cache.addAll([
'/assets/img/favicon.png',
'/assets/img/glowing_bear_128x128.png',
'/assets/img/glowing-bear.svg',
'/assets/img/badge_playstore.png',
View broadcast.hpp
#include <boost/mpi.hpp>
/*
* Example how boost::mpi::broadcast could be implemented efficiently for types
* that need to be serialized, without falling back to Point-to-Point communication
*
* Lorenz Hübschle-Schneider, 2015
* Distributed under the Boost Software License, Version 1.0
*/
@lorenzhs
lorenzhs / unsafe_mpi.hpp
Last active Mar 1, 2016
Unsafe boost::mpi things
View unsafe_mpi.hpp
#pragma once
// Copyright (C) 2015 Lorenz Hübschle-Schneider <lorenz@4z2.de>
// MIT License
#include <cstdint>
#include <type_traits>
#include <vector>
#include <boost/mpi.hpp>
@lorenzhs
lorenzhs / 20-thinkpad-keyboard.conf
Created Aug 18, 2015
X11 ThinkPad USB Keyboard config with right click scroll
View 20-thinkpad-keyboard.conf
Section "InputClass"
Identifier "Trackpoint Wheel Emulation"
MatchProduct "TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite TouchPad / TrackPoint|ThinkPad USB Keyboard with TrackPoint|ThinkPad Compact USB Keyboard with TrackPoint|USB Trackpoint pointing device"
MatchDevicePath "/dev/input/event*"
Option "EmulateWheel" "true"
Option "EmulateWheelButton" "3"
Option "EmulateWheelTimeout" "150"
Option "Emulate3Buttons" "false"
Option "XAxisMapping" "6 7"
Option "YAxisMapping" "4 5"