Skip to content

Instantly share code, notes, and snippets.

@jpihl
jpihl / CMakeLists.txt
Last active February 10, 2021 08:14
Steinwurf CMake Example
cmake_minimum_required (VERSION 3.11)
project(cmake_example)
include(FetchContent)
FetchContent_Declare(
kodo_rlnc
GIT_REPOSITORY git@github.com:steinwurf/kodo-rlnc.git
GIT_TAG 17.0.0
)
@jpihl
jpihl / walk_up.py
Last active June 21, 2018 08:16 — forked from zdavkeos/walk_up.py
python walk_up - like os.walk, only works its way up instead of down
#!/usr/bin/env python
"""
os.walk is an awesome generator.
However, I needed the same functionality,
only I wanted to walk 'up' the
directory tree.
This allows seaching for files
in directories directly above
a given directory.
@jpihl
jpihl / gist:5137950
Created March 11, 2013 21:30
Co-variant vs. Contra-variant... Note: Compile errors have been commented out.
namespace OOP
{
class Food { }
class Pizza : Food { }
class PepperoniPizza : Pizza { }
class Salad : Food { }
class Document { }
class ComputerProgram : Document { }
class ComputerGame : ComputerProgram { }
@jpihl
jpihl / android_boost_filesystem.patch
Created November 14, 2012 19:08
Use this to compile boost 1.52 with the android ndk
diff --git a/libs/filesystem/src/operations.cpp b/libs/filesystem/src/operations.cpp
index 16a336f..a1504b5 100644
--- a/libs/filesystem/src/operations.cpp
+++ b/libs/filesystem/src/operations.cpp
@@ -73,13 +73,15 @@ using std::wstring;
const fs::path dot_dot_path("..");
# include <sys/types.h>
# include <sys/stat.h>
-# if !defined(__APPLE__) && !defined(__OpenBSD__)
+# if !defined(__APPLE__) && !defined(__OpenBSD__) && !defined(__ANDROID__)