Skip to content

Instantly share code, notes, and snippets.

Travis Gockel tgockel

Block or report user

Report or block tgockel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
tgockel / same_named_ctor_and_method.cpp
Last active Jul 15, 2016
Override method which has the same name as the class
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.
* Two methods are proposed, one using a typedef and the other using static
* polymorphism (see below for implementation). The conclusion is there are
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);
tgockel / .zshrc
Last active Apr 11, 2017
Personal zshrc for storage reasons
View .zshrc
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'

Keybase proof

I hereby claim:

  • I am tgockel on github.
  • I am 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 glossary.rst



This is a test of using the glossary directive.

.. glossary::
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 sudo4container
# Most containers do not have the sudo program installed, but this works well
# enough.
exec "$@"
You can’t perform that action at this time.