Skip to content

Instantly share code, notes, and snippets.

@jk
jk / keybase.md
Created July 5, 2023 19:09
keybase.md

Keybase proof

I hereby claim:

  • I am jk on github.
  • I am jenskohl (https://keybase.io/jenskohl) on keybase.
  • I have a public key ASCJQngNFVFpJ0E9EF6huIW-XMK7ylP7mUlcTa0jMKgpbAo

To claim this, I am signing this object:

@jk
jk / kagi-summarizer-bookmarklet.js
Created February 12, 2023 12:23
Kagi Universal Summarizer Bookmarklet for every Browser that supports it
javascript:q=location.href;if(document.getSelection){d=document.getSelection();}else{d='';};p=document.title;void(open('https://labs.kagi.com/ai/sum?url='+encodeURIComponent(q),'Kagi Universal Summarizer','toolbar=no,width=710,height=685'));
@jk
jk / docker-compose.yml
Created May 25, 2022 11:12
Traefik docker-compose network settings
version: '3.8'
services:
traefik:
image: traefik:v2.5.0-rc2
container_name: traefik
restart: always
environment:
- TZ=Asia/Taipei
ports:
@jk
jk / regex.txt
Created September 14, 2021 12:05
YouTrack Issue Number RegEx
/\b[A-Z_0-9]+-[1-9]\d?\b/gmi
@jk
jk / sodium.php
Created March 16, 2021 14:06
Sodium Test
<?php
if (sodium_crypto_aead_aes256gcm_is_available()) {
echo 'sodium_crypto_aead_aes256gcm_is_available is true'.PHP_EOL;
} else {
echo 'sodium_crypto_aead_aes256gcm_is_available is false'.PHP_EOL;
}
//echo 'Generated key with sodium_crypto_aead_aes256gcm_keygen is: ' . sodium_crypto_aead_aes256gcm_keygen() . PHP_EOL;
$msg = 'john.doe@example.com';
@jk
jk / gitlab-ci.yml
Created December 18, 2020 13:11
Run JetBrains Qodana on GitLab CI
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
@jk
jk / Dockerfile
Last active April 22, 2020 11:50
glove
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 July 25, 2019 11:49
Get current temperatur from hamburger wettermast as text (instead of an image)
#!/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
# -*- 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 April 29, 2019 13:02
PHP 7.3 with zstd extension
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 && \