Skip to content

Instantly share code, notes, and snippets.

View gist:aebe7fa6a06fa0ae02e22b7ed0bfed12
- We're using C++11, nothing newer,_Static_Member,_and_Global_Functions
View gist:a3454e4dce1787af30e60f7180b650d1
"By “modern C++” we mean effective use of the ISO C++ standard (currently C++17, but almost all of our recommendations also apply to C++14 and C++11)"
IOW, it's primarily written against a version of C++ that we already know we can't use because not all platforms support C++17.
At best, our common denominator is C++14 but most likely only C++11. I wouldn't go beyond C++11 at this time.
BenjamenMeyer / README
Created Mar 27, 2021
Ansible DNS Root MD5 Dict Lookups
I am attempting to download the Root DNS Zones from ISC and I want to validate the data using the MD5 sums they provide.
I had this working in the past (summer 2020) but something changed and I had to rewrite it to the content in the root_zone.yml.
The essential is this:
1. dns_root_zones holds the dict of data (set via the role defaults)
2. the data is downloaded onto the node
3. the MD5 contents are slurped back to the host so it can be used in the verification step of the actual root file download
4. If I hard code the `selectattr` parameter, then it works fine; but that's not extensible
5. If I link the `selectattr` parameter to the loop variable so I can process the dns_root_zones properly ( like I do in other roles) then it breaks and doesn't find the data
BenjamenMeyer / discussion
Last active Dec 20, 2017
QtCreator + Android Debugging
View discussion
(05:19:53 PM) TemporalBeing: @sergio
(05:22:25 PM) sergio: TemporalBeing: what's in /home/bmeyer/Android/Sdk/platforms/ ?
(05:24:18 PM) TemporalBeing: folders for `android-2[3-7]`
(05:28:47 PM) TemporalBeing: details at
(05:35:22 PM) sergio: my setup looks different, I have the ndk outside of the sdk, and it tells me to use the native sdk manager
(05:35:42 PM) sergio: TemporalBeing: if you click on the "Native SDK Manager" button, does it tell you have the platform sdk correcty installed ?
(05:36:51 PM) TemporalBeing: it just tells me: " SDK manager UI tool is not available in the installed SDK tools (version 26.1.1). Use the command line tool "sdkmanager" for advanced SDK management"
(05:37:41 PM) sergio: ask bog_dan_ro in #necessitas tomorrow
echo "Cleaning up after docker..."
STOPPED_CONTAINERS=$(sudo docker ps -aq)
if [ -n "${STOPPED_CONTAINERS}" ]; then
echo "Removing stopped containers..."
sudo docker rm ${STOPPED_CONTAINERS}
BenjamenMeyer /
Last active Apr 5, 2017
paramiko directly vs sshaolin wrapper
from paramiko.client import (
from paramiko.ssh_exception import *
host = "<host>"
user = "root"
password = "<password>"
BenjamenMeyer / README.rst
Created Jan 14, 2017
FreeCAD - modeling a 2"x4"x8' board with pockets for interlock
View README.rst

I am working on a building a physical workbench with storage. The bench will be 8 ft long, 4 ft high, 4 ft deep - these are relatively easy dimensions in the US since stock lumber comes in a few sizes - the most popular is 2"x4"x8', so I just have to cut some boards in half.

Now, I've already drawn by hand - on paper - my ideas. But I'd like to try my hand at making them in a CAD tool and see if I can get a more accurate design creation. My prime choice is FreeCAD - AutoCAD is too expensive for my hobbyist needs and I love open source, and FreeCAD seems to be among the best there is from the FOSS world....that's not to say it is the best but it's what my (albeit limited) research shows is a good choice.

I figured out how to model the basic lumber I need - for example, the common 2"x4"x8'. However, my design also calls for

BenjamenMeyer /
Created Jun 6, 2016
Example Mimic Token Validation
import json
import requests
def get_creds(ad):
resp =
BenjamenMeyer / build_output
Created Apr 22, 2015
View build_output
bmeyer@clockwerks1:~/Devel/qtmd5gui/src$ make
[ 14%] Automoc for target qthashgui
[ 14%] Built target qthashgui_automoc
[100%] Built target qthashgui
bmeyer@clockwerks1:~/Devel/qtmd5gui/src$ ./qthashgui
Failed to prepare INSERT INTO master_directory (hash, path) VALUES(:hash, :path)
Failed to prepare SELECT hash, path FROM master_directory WHERE hash = :hash
Failed to prepare INSERT INTO checked_directory (hash, path) VALUES (:hash, :path)
Failed to prepare INSERT INTO master_files (hash, path) VALUES(:hash, :path)
Failed to prepare SELECT hash, path FROM master_files WHERE hash = :hash
BenjamenMeyer /
Last active Aug 29, 2015
Keystone Mocking issue...
import base64
import binascii
import simplejson as json
import redis
from keystoneclient.v2_0 import client as keystonev2_client
import keystone.exceptions
import keystoneclient.access as keystone_access