Skip to content

Instantly share code, notes, and snippets.

View jmjatlanta's full-sized avatar

John M. Jones jmjatlanta

View GitHub Profile
@jmjatlanta
jmjatlanta / Makefile
Last active September 3, 2018 13:50
What happens when you use an thread-unsafe collection
CC=g++
CFLAGS=-g
DEPS=
%.o: %.cpp $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
test_threadsafe: test_threadsafe.o
$(CC) -g -O0 -lSegFault -o test_threadsafe $^ -lpthread -rdynamic
@jmjatlanta
jmjatlanta / bitshares_compile_windows.md
Created June 15, 2018 19:03
Compile Bitshares-Core for Windows
@jmjatlanta
jmjatlanta / bitshares_build_win32.md
Last active July 29, 2018 22:02
Build Bitshares-Core on Windows

Note: This is a work in progress. I am still diagnosing an issue that seems to be related to cmake/boost. I am posting this here to hopefully help others and someday find the time to fix my cmake/boost issue.

Windows - Visual Studio 2015 Update 1

Prerequisites for Bitshares Core

  • 64-bit Windows operating system. These instructions were created with Windows 10 on an Intel PC.
  • Visual Studio Community 2015 Update 1. Note: There seem to be problems compiling with Visual Studio versions above 2015 Update 1 (including VS2017).
  • Perl. Active Perl was used for this document. It is assumed that it is in your PATH.
  • CMake. Version 3.11 was used for this document. It is assumed that it is in your PATH.
  • NASM is needed to compile OpenSSL. It is assumed that it is in your PATH.
@jmjatlanta
jmjatlanta / asset_tests.cpp
Created June 6, 2018 12:50
Test for asset::amount_to_string
/*
* Copyright (c) 2018 Bitshares Foundation, and contributors.
*
* The MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@jmjatlanta
jmjatlanta / pub_sub_cpp.cpp
Last active December 18, 2019 05:54 — forked from makomweb/pub_sub_cpp.cpp
Fun with C++: implementing a pub/sub scenario using std::bind and other standard facilities. The approach is pretty similar to the well known .NET event mechanism.
#include <iostream>
#include <map>
#include <algorithm>
#include <functional>
#include <memory>
using namespace std;
/***
* A base class for event arguments

Keybase proof

I hereby claim:

  • I am jmjatlanta on github.
  • I am jmjatlanta (https://keybase.io/jmjatlanta) on keybase.
  • I have a public key ASAF3Nqn3SJKkWiep11tfEK2paGPUGqU5KyfmamSR0etPgo

To claim this, I am signing this object: