Skip to content

Instantly share code, notes, and snippets.

View erictapen's full-sized avatar

Kerstin erictapen

  • Potsdam, germany
View GitHub Profile
@frankrausch
frankrausch / build_html_from_md.sh
Last active November 13, 2023 14:11
Convert Markdown to HTML with a custom template
pandoc -o index_temp.html index.md
cat header.html index_temp.html footer.html > index.html
rm index_temp.html
@cjies
cjies / vapid_helper.py
Created November 22, 2019 04:44
Python based VAPID key-pair generator
import base64
import ecdsa
def generate_vapid_keypair():
"""
Generate a new set of encoded key-pair for VAPID
"""
pk = ecdsa.SigningKey.generate(curve=ecdsa.NIST256p)
vk = pk.get_verifying_key()
@Nadrieril
Nadrieril / shell.nix
Last active May 20, 2024 04:02
Building LineageOS on NixOS
# I used this shell.nix to build LineageOS 13.0 for my maguro (Samsung Galaxy Nexus GSM) phone
# The build instructions for normal Linuxes are here: https://wiki.lineageos.org/devices/maguro/build
# For NixOS, follow those instructions but skip anything related to installing packages
# Detailed instructions:
# cd into an empty directory of your choice
# copy this file there
# in nix-shell:
# $ repo init -u https://github.com/LineageOS/android.git -b cm-13.0
# $ repo sync
# $ source build/envsetup.sh
@focusaurus
focusaurus / A.elm
Created December 5, 2016 00:26
Decode JSON string enum into elm union type
module A exposing (..)
import Json.Decode as JD
import Json.Encode as JE
type alias User =
{ id : Int
, theme : Theme
}
@jpt1122
jpt1122 / StrangeImageTest.java
Created July 23, 2014 11:02
Solution for this Exception : Numbers of source Raster bands and source color space components do not match when i read image
import java.awt.image.BufferedImage;
import java.awt.image.Raster;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Iterator;
import javax.imageio.ImageIO;
import javax.imageio.ImageReader;