Skip to content

Instantly share code, notes, and snippets.

Lars K.W. Gohlke lkwg82

View GitHub Profile
@lkwg82
lkwg82 / bash-prompt.sh
Created May 3, 2020
bash prompt with terraform workspace and git info
View bash-prompt.sh
#!/bin/bash
if [[ ! -f $(brew --prefix)/opt/bash-git-prompt/share/gitprompt.sh ]]; then
echo "installing first time bash-git-prompt"
brew install bash-git-prompt
fi
if [[ -f $(brew --prefix)/opt/bash-git-prompt/share/gitprompt.sh ]]; then
__GIT_PROMPT_DIR=$(brew --prefix)/opt/bash-git-prompt/share
@lkwg82
lkwg82 / convert-pdf-ocr.sh
Created Apr 19, 2020
bash script to use ocrmypdf to convert scanned pdfs without to pdfs with searchable text
View convert-pdf-ocr.sh
#!/bin/bash
set -ex
function convertPdf(){
local file=$1
set -e
echo $file
@lkwg82
lkwg82 / anonymize.pl
Last active Sep 15, 2019
anonymize syncthing log with config xml
View anonymize.pl
#!perl
use strict;
use warnings;
$| = 1;
# use module
use XML::Simple;
use Data::Dumper;
View keybase.md

Keybase proof

I hereby claim:

  • I am lkwg82 on github.
  • I am lkwg82 (https://keybase.io/lkwg82) on keybase.
  • I have a public key ASBl04qbPsRW33q1X66G9v8NXX7ILxphWXuhkU5ZY7Dxvgo

To claim this, I am signing this object:

@lkwg82
lkwg82 / Readme.md
Last active Jan 19, 2018
openshift wrapper
View Readme.md

Summary:

Have developer friendly wrapper for openshift with an application-centric perspective.

Rationale:

Avoid steep learning curve to initial learn oc .... commands and concepts. Enable self-service by design.

Goals:

@lkwg82
lkwg82 / SimplestEmbeddedKafkaIT.java
Created Dec 20, 2017
simples embedded Kafka test
View SimplestEmbeddedKafkaIT.java
import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static org.assertj.core.api.Assertions.assertThat;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.concurrent.ExecutionException;
import org.junit.ClassRule;
View AccessLogAutoConfiguration.java
import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer;
import org.springframework.boot.context.embedded.tomcat.TomcatContextCustomizer;
import org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import ch.qos.logback.access.tomcat.LogbackValve;
import ch.qos.logback.core.util.ContextUtil;
import lombok.extern.slf4j.Slf4j;
View gist:9c8a86f16a89fa657ac5
$ npm install
npm http GET http://registry.npmjs.org/grunt-contrib-concat
npm http GET http://registry.npmjs.org/grunt-contrib-clean
npm http GET http://registry.npmjs.org/grunt-contrib-copy
npm http GET http://registry.npmjs.org/grunt
npm http GET http://registry.npmjs.org/grunt-contrib-cssmin
npm http GET http://registry.npmjs.org/grunt-contrib-watch
npm http GET http://registry.npmjs.org/grunt-filerev
npm http GET http://registry.npmjs.org/grunt-contrib-htmlmin
npm http GET http://registry.npmjs.org/grunt-filerev-replace
View gist:5846675
#!/bin/bash
g=gphoto2
function cap(){
$g --capture-image-and-download
}
function config()
{
You can’t perform that action at this time.