Instantly share code, notes, and snippets.

View glossary.rst

Glossary

Directive

This is a test of using the glossary directive.

.. glossary::
View keybase.md

Keybase proof

I hereby claim:

  • I am tgockel on github.
  • I am tgockel (https://keybase.io/tgockel) on keybase.
  • I have a public key whose fingerprint is 09F3 9016 6B20 BA4B 871C B209 6B77 60BB 7758 2F79

To claim this, I am signing this object:

View .zshrc
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
unsetopt beep
export MAKEFLAGS="-j9"
export PATH="${PATH}:/home/$(whoami)/Dropbox/bin"
alias dd-status-update='for x in $(pgrep -l "^dd$" | sed "s|^\([^ ]*\).*$|\1|"); do sudo kill -USR1 ${x}; done'
alias can-has='sudo zypper install'
View crc32.cpp
/** \file crc32.cpp
* A number of implementations of a CRC32 algorithm. This program will only work on a CPU with SSE 4.2 support.
*
* Compile with:
*
* $> g++ --std=c++17 crc32.cpp -O3 -fwhole-program
*
* The output is a CSV file showing the timings of the various implementations.
**/
View random_seed.cpp
#include "random_seed.hpp"
int main()
{
// Just test that this compiles...not really sure what to do with these things
tgl::random_device_seed seed;
std::mt19937_64 mt_rng(seed);
std::minstd_rand lc_rng(seed);
std::ranlux48 lx_rng(seed);
}
View same_named_ctor_and_method.cpp
/** \file
* This is an attempt to answer the Stack Overflow question "Override method
* which has the same name as the class," wherein I ask how one would go about
* implementing a virtual method of some derived type which happens to have the
* same name as the method I need to implement.
*
* http://stackoverflow.com/questions/38384075/
*
* Two methods are proposed, one using a typedef and the other using static
* polymorphism (see below for implementation). The conclusion is there are