Skip to content

Instantly share code, notes, and snippets.

Jake Sylvestre jakesyl

Block or report user

Report or block jakesyl

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
gubatron / CMakeList.txt
Last active Jan 22, 2020
CMakeList.txt for Bitcoin Unlimited + macOS CLion IDE based development
View CMakeList.txt
# Author: Angel Leon (@gubatron)
# October 2nd 2018
# This CmakeLists.txt file is not meant to produce any executables or libraries.
# It has been created for CLion or any other cmake compatible IDE users so that they can
kantoniak / chrono-unixtimestamp.cpp
Created Apr 13, 2017
std::chrono example - getting unix timestamp
View chrono-unixtimestamp.cpp
#include <chrono>
#include <ctime>
#include <iostream>
int main() {
// std::chrono only
auto now = std::chrono::system_clock::now();
std::cout << "std::chrono only: " << std::chrono::duration_cast<std::chrono::seconds>(now.time_since_epoch()).count() << std::endl;
fenbf / sfinae_tostring_ex.cpp
Created Feb 9, 2016
C++ SFINAE example: how to detect if a class contains ToString method
View sfinae_tostring_ex.cpp
// SFINAE, enable_if example
// based on
#include <iostream>
#include <type_traits>
class ClassWithToString
myusuf3 /
Created Nov 3, 2014
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
# taken from
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl
balupton /
Created Jul 3, 2013
Android Emulator

Android Emulator

  1. Download Android Studio
  2. Create a virtual device: /Applications/Android\ create avd -n <name> -t 1
  3. List your virtual devices: /Applications/Android\ list avd
  4. Run your virtual device: /Applications/Android\ -avd basic
matthewmccullough /
Created May 14, 2012
Git, Compression, and Deltas - An explanation

Git Compression of Blobs and Packfiles.

Many users of Git are curious about the lack of delta compression at the object (blob) level when commits are first written. This efficiency is saved until the pack file is written. Loose objects are written in compressed, but non-delta format at the time of each commit.

A simple run though of a commit sequence with only the smallest change to the image (in uncompressed TIFF format to amplify the observable behavior) aids the understanding of this deferred and different approach efficiency.

The command sequence:

Create the repo:

You can’t perform that action at this time.