Skip to content

Instantly share code, notes, and snippets.

Avatar
🌴
On vacation

Jens Kohl jk

🌴
On vacation
View GitHub Profile
@jk
jk / gitlab-ci.yml
Created Dec 18, 2020
Run JetBrains Qodana on GitLab CI
View gitlab-ci.yml
qodana:
stage: report
image:
name: jetbrains/qodana:latest
entrypoint: ["/usr/bin/bash", "-l", "-c"]
needs:
- composer-prod
script:
- ln -sf $CI_PROJECT_DIR/ /data/project
- /opt/idea/bin/entrypoint --save-report
View Dockerfile
FROM nvidia/cuda:10.0-base-ubuntu18.04
# See http://bugs.python.org/issue19846
ENV LANG C.UTF-8
LABEL com.nvidia.volumes.needed="nvidia_driver"
RUN echo "deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/nvidia-ml.list
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libc6-dev \
@jk
jk / hh-wettermast.sh
Last active Jul 25, 2019
Get current temperatur from hamburger wettermast as text (instead of an image)
View hh-wettermast.sh
#!/bin/bash
curl -fsSL -o /tmp/temp.gif https://wettermast.uni-hamburg.de/plots/TT002_TND.gif \
&& tesseract /tmp/temp.gif /tmp/out -l eng 2&>1 /dev/null \
&& cat /tmp/out.txt \
| grep -h -P '\d+,\d' \
; rm -f out.txt temp.gif
View enviroplus-influxdb.py
# -*- coding: utf-8 -*-
"""Test using the InfluxDB client."""
import time
import colorsys
import os
import sys
import socket
import ST7735
import ltr559
@jk
jk / Dockerfile
Created Apr 29, 2019
PHP 7.3 with zstd extension
View Dockerfile
FROM php:7.3
LABEL maintainer="Jens Kohl <jens.kohl@gmail.com>"
RUN apt-get update && \
apt-get install --no-install-recommends -y git-core && \
git clone --recursive --depth=1 https://github.com/kjdev/php-ext-zstd.git && \
cd php-ext-zstd && \
phpize && \
./configure && \
@jk
jk / 01-install_telegraf.sh
Last active Mar 4, 2019
Telegraf Speedtest
View 01-install_telegraf.sh
#!/bin/bash
curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -
echo "deb https://repos.influxdata.com/debian stretch stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
sudo apt-get update
sudo apt install -y telegraf
View raspi-borg-install.sh
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
# Official binaries: https://github.com/borgbackup/borg/releases
# ARM binaries: https://borg.bauerj.eu/
wget https://dl.bintray.com/borg-binary-builder/borg-binaries/borg-1.1.9-armv6 -O /usr/bin/borg
View pngquant.patch
diff -ur pngquant-2.9.0/configure pngquant-2.9.0.fixed/configure
--- pngquant-2.9.0/configure 2017-03-06 09:37:30.000000000 +0100
+++ pngquant-2.9.0.fixed/configure 2017-03-07 09:57:20.246012152 +0100
@@ -48,6 +48,7 @@
help "--with-cocoa/--without-cocoa use Cocoa framework to read images"
fi
help "--with-libpng=<dir> search for libpng in directory"
+ help "--with-zlib=<dir> search for zlib in directory"
echo
help "CC=<compiler> use given compiler command"
@jk
jk / diff_composer_packages.php
Created Oct 14, 2017
Diff Composer Packages
View diff_composer_packages.php
<?php
$old = [
'muz' => [
'package1' => [
'1.0.0',
'1.0.1',
'2.0.0'
],
'package2' => ['1.0.0'],
View docker-ubuntu.sh
# Installs some things I need while debuging from inside a docker container
apt-get update
apt-get install -qy \
vim \
iputils-ping \
dnsutils \
traceroute \
mtr \
apt-file