Skip to content

Instantly share code, notes, and snippets.

@jdkato
jdkato / PaddleSetup.cpp
Created June 24, 2019 17:33 — forked from adamski/PaddleSetup.cpp
Cross-platform C++ wrapper for the Paddle licensing SDK
/*
==============================================================================
PaddleSetup.cpp
Created: 23 Sep 2017 9:15:20pm
Author: Adam Wilson
==============================================================================
*/
@jdkato
jdkato / Demo.c
Created August 9, 2017 06:07 — forked from mikeando/Demo.c
Example of using C++ from C.
#include "HMyClass.h"
#include <stdio.h>
void my_eh( const char * error_message, void * unused)
{
printf("my_eh: %s\n", error_message);
}
int main()
{
@jdkato
jdkato / recover_source_code.md
Created May 28, 2017 16:40 — forked from simonw/recover_source_code.md
How to recover lost Python source code if it's still resident in-memory

How to recover lost Python source code if it's still resident in-memory

I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6

Attach a shell to the docker container

Install GDB (needed by pyrasite)

apt-get update && apt-get install gdb
@jdkato
jdkato / pypi-release-checklist.md
Created November 16, 2016 13:59 — forked from audreyfeldroy/pypi-release-checklist.md
My PyPI Release Checklist
  • Update HISTORY.rst
  • Commit the changes:
git add HISTORY.rst
git commit -m "Changelog for upcoming release 0.1.1."
  • Update version number (can also be minor or major)
bumpversion patch