Skip to content

Instantly share code, notes, and snippets.

View DenisKramer's full-sized avatar

Denis Kramer DenisKramer

  • Helmut-Schmidt-University
  • Hamburg, Germany
View GitHub Profile
@DenisKramer
DenisKramer / Dockerfile
Created December 8, 2020 08:57
A simple socket proxy that channels communication between two unix sockets
FROM golang as build
WORKDIR /app
COPY *.go /app/
RUN CGO_ENABLED=0 GOOS=linux go build -o /bin/sproxy sproxy.go
RUN CGO_ENABLED=0 GOOS=linux go build -o /bin/secho echo.go
FROM alpine
RUN apk add --no-cache netcat-openbsd
@DenisKramer
DenisKramer / tex
Created January 7, 2021 09:35
LaTeX Beamer frame environment with image background
% This beamer environment provides a simple way to make slides with full-size images
%
% Usage:
% \begin{imageframe}[keepaspectratio,width=\paperwidth]{bg_image.jpg}
Here comes my slide content
\end{imageframe}
%
% The environment scales the image to fit the slide by default in a way that ensures the
% entire picture is visible. That is usually not what you want. Use the optional parameter
% to scale it as needed. Some common options are:
@DenisKramer
DenisKramer / tailwind.config.ts
Last active July 16, 2024 09:11
Parallax plugin for tailwindcss
/*
Provides a tailwindcss plugin for parallax effects.
Usage:
1. Define class names for background images in the themes section of tailwind.config.ts
2. Use parralax effect on element:
<div className="parallax-my-background w-screen h-screen"></div>
@DenisKramer
DenisKramer / periodic_table_plot.py
Last active August 23, 2024 08:46
Periodic Table Heatmap widget for Python and Jupyter notebooks using Bokeh and Pandas
def periodic_table_plot(df, title="", element_column_name="element", value_column_name=None, colors="#ddd"):
'''
Create an interactive periodic table with heatmap.
Parameters:
df Pandas Dataframe with relevant data. Has to have at least two columns with element
symbols (e.g., Fe, Ir, H, ...) and a second column with values to display as heat map
title A descriptive string shown as title with the periodic table
element_column_name A string containing the name of the column with the element symbols in the df dataframe
@DenisKramer
DenisKramer / gist:641acdba305e2a311b9b5b6c29c3d4bb
Last active April 18, 2026 19:40
Simple CoreOS Ignition Config with username:password
{
"ignition": {
"version": "3.0.0"
},
"passwd": {
"users": [
{
"groups": [
"sudo",
"docker"