Skip to content

Instantly share code, notes, and snippets.

Maik Riechert letmaik

Block or report user

Report or block letmaik

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
@letmaik
letmaik / README.md
Last active May 10, 2019
Using travis_retry inside shell scripts together with set -e
View README.md

If you want to use travis_retry from within your own shell script files then you first have to make the travis_retry shell function available by sourcing the travis_retry.sh file, otherwise you just get a "command not found" error. See example.sh for a full example.

Note that the original function as found in the travis-ci/travis-build repository was slightly modified to allow it to be used in a shell context where set -e is enabled.

For reference, a tweet by Travis CI saying that you should copy the travis_retry code as I've done here: https://twitter.com/plexus/status/499194992632811520

@letmaik
letmaik / CartesianProduct.ps1
Created Apr 27, 2017
Cartesian product with keys (cross join) in PowerShell
View CartesianProduct.ps1
function CartesianProduct {
param
(
[Parameter(Mandatory = $true, ValueFromPipeline = $true)]
[Hashtable]
$values = @{ Foo = 1..5; Bar = 1..10}
)
$keys = @($values.GetEnumerator() | ForEach-Object { $_.Name })
$result = @($values[$keys[0]] | ForEach-Object { @{ $keys[0] = $_ } })
if ($keys.Length -gt 1) {
@letmaik
letmaik / symlinks.psm1
Created Mar 8, 2017
Create symlinks to folders and files on Windows without admin privileges in Powershell
View symlinks.psm1
@letmaik
letmaik / print-program-options.cc
Last active Jan 19, 2017 — forked from gesquive/print-program-options.cc
Methods to print out boost::program_options objects (C++11)
View print-program-options.cc
#include <string.h>
#include <iostream>
#include "boost/program_options.hpp"
#include "boost/filesystem.hpp"
#include "boost/any.hpp"
namespace po = boost::program_options;
inline void PrintUsage(const boost::program_options::options_description desc) {
std::cout << "Usage: " << app_name << " [options]" << std::endl;
@letmaik
letmaik / index.html
Created Oct 7, 2016
Leaflet GridLayer example with Canvas
View index.html
<!DOCTYPE html>
<html>
<head>
<title>GridLayer Test</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.1/dist/leaflet.css" />
<style>
body {
padding: 0;
margin: 0;
@letmaik
letmaik / index.html
Last active Oct 28, 2016
CovJSON minimal visualization example
View index.html
<!DOCTYPE html>
<html>
<style>
html, body, #map {
width: 100%; height: 100%;
margin: 0;
}
</style>
@letmaik
letmaik / 0_input.jsonld
Last active May 12, 2016
GeoDCAT-AP Sandbox JSON-LD framing
View 0_input.jsonld
{
"@graph": [{
"@id": "http://inspire-sandbox.jrc.ec.europa.eu/resource/de_e70f8705-e89d-11e2-9634-52540004b857_dataset_6555",
"@type": "http://www.w3.org/ns/dcat#Dataset",
"http://purl.org/dc/terms/modified": [{
"@value": "2015-12-03",
"@type": "http://www.w3.org/2001/XMLSchema#date"
}],
"http://www.w3.org/2000/01/rdf-schema#comment": [{
"@value": "Spatial resolution (equivalent scale): 1:1000",
@letmaik
letmaik / ndarray.html
Created Aug 16, 2015
Fun with ndarray and canvas
View ndarray.html
<!DOCTYPE html>
<html>
<body>
<canvas id="canvas" width="300" height="300"></canvas>
<script src="https://jspm.io/system@0.16.js"></script>
<script>
System.import('npm:ndarray').then(function(ndarray) {
System.import('npm:ndarray-warp').then(function(warp) {
var canvas = document.getElementById('canvas')
var w = canvas.width
@letmaik
letmaik / test.html
Created Jul 26, 2015
Performance of DataView vs inline code for little/big endian conversion (inline wins)
View test.html
<!doctype html>
<html>
<body>
DataView: <span id="time_dataview"></span><br />
Inline: <span id="time_inline"></span>
<script>
var littleEndian = (function() {
@letmaik
letmaik / theme-37093.xml
Last active Aug 29, 2015
Eclipse Color Theme (Obsidian variation, esp. for Java)
View theme-37093.xml
<?xml version="1.0" encoding="utf-8"?>
<colorTheme id="37093" name="Obsidian Java" modified="" author="Maik">
<searchResultIndication color="#616161" />
<filteredSearchResultIndication color="#616161" />
<occurrenceIndication color="#616161" />
<writeOccurrenceIndication color="#616161" />
<findScope color="#E0E2E4" />
<deletionIndication color="#E0E2E4" />
<sourceHoverBackground color="#FFFFFF" />
<singleLineComment color="#7D8C93" />
You can’t perform that action at this time.