Skip to content

Instantly share code, notes, and snippets.

View LarsEckart's full-sized avatar

Lars Eckart LarsEckart

View GitHub Profile

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@LarsEckart
LarsEckart / k8s-pi.md
Created February 6, 2018 17:21 — forked from alexellis/k8s-pi.md
K8s on Raspbian

K8s on (vanilla) Raspbian Lite

Yes - you can create a Kubernetes cluster with Raspberry Pis with the default operating system Raspbian. Carry on using all the tools and packages you're used to with the officially-supported OS.

Pre-reqs:

  • You must use an RPi2 or 3 for Kubernetes
  • I'm assuming you're using wired ethernet (Wi-Fi also works)

Master node setup

/*
* Copyright (c) 2009-2015, Data Geekery GmbH (http://www.datageekery.com)
* All rights reserved.
*
* This work is dual-licensed
* - under the Apache Software License 2.0 (the "ASL")
* - under the jOOQ License and Maintenance Agreement (the "jOOQ License")
* =============================================================================
* You may choose which license applies to you:
*
@LarsEckart
LarsEckart / snippet.xml
Created April 2, 2021 20:44
md snippet live template for intellij
<template
name="snippet"
value="// begin-snippet: $SnippetName$&#10;$SELECTION$&#10;// end-snippet&#10;&#10;// use in .md file: snippet: $SnippetName$"
description="generate a code snippet"
toReformat="false"
toShortenFQNames="true">
<variable
name="SnippetName"
expression="&quot;MySnippetName&quot;"
defaultValue=""
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="match_parent"
android:layout_width="match_parent">
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/shopping_basket"
package com.example.chenformula;
public class ChenCalculator {
public static int calculate(String firstCard, String secondCard, boolean suited) {
double result = 0.0;
result += scoreHighestCardOnly(firstCard, secondCard);
if (isPair(firstCard, secondCard)) {
package com.example.chenformula;
import java.util.HashMap;
import java.util.Map;
public class ChenCalculator {
public static int calculate(String firstCard, String secondCard, boolean suited) {
double result = 0.0;
@LarsEckart
LarsEckart / ChenCalculator.java
Last active June 25, 2022 14:08
Chen Formula App
package com.example.chenformula;
import java.util.HashMap;
import java.util.Map;
public class ChenCalculator {
public static final Map<String, Double> POINTS_BY_CARD = new HashMap<>();
static {