Skip to content

Instantly share code, notes, and snippets.

Christopher Mühl padarom

View GitHub Profile
@padarom
padarom / christopher.key
Last active Nov 2, 2019
christopher@padarom.xyz GPG2 key
View christopher.key
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQENBF29Ug4BCACjBny+3AwzE7EDXvvI7kaQoGYnLi3e37x/mip1k3gBt6s4l/r0
QjPz51VP1yQVUV67b80HqFDKQl5mQXOutyWWLuxXbd5yuoAo0D+tXfmVOnMxbVHA
Ajd/QKUyYMnX6NsyB5gwAfmISweNhfzUbT5ga1PcWbEH7Qjtf3WI5e02+gWGuU69
WVJqJYUcPFko5vDwt3LTzttK0cg30uFNpicfz/cZsHdQto2C8mL8h0b7bn5NreN2
0z6uOmk62SHhbyGKAgN1vNd0kWRGz0mqdtq/ZAjgV+aqMLHqroNdxKI03i0vepZB
/Qw8vZbkURrdcnuC9qcx4MwsddHKjHuNKkv3ABEBAAG0K0NocmlzdG9waGVyIE3D
vGhsIDxjaHJpc3RvcGhlckBwYWRhcm9tLnh5ej6JAVQEEwEIAD4WIQTmr+JoQUc/
PIgSwq6/+CGqmimzAQUCXb1SDgIbAwUJA8JnAAULCQgHAgYVCgkICwIEFgIDAQIe
@padarom
padarom / Origami.g4
Created Sep 20, 2018
Origami ANTLRv4 description, first version
View Origami.g4
grammar Origami;
tokens { INDENT, DEDENT }
options {
accessLevel = '';
}
@lexer::members {
private var tokens: [Token] = []
@padarom
padarom / renew.sh
Last active Mar 9, 2016
Let's Encrypt renewal script to use with Vesta CP
View renew.sh
#!/bin/bash
# Stop nginx
service nginx stop
# CD to Let's Encrypt root
cd /root/letsencrypt
# New Line should be the only whitespace to split by
IFS=$'\n'
@padarom
padarom / UIColorExtensions.swift
Last active Dec 18, 2015
Convenience Init for Swift's UIColor to support Hex strings (works in Swift 2.0+)
View UIColorExtensions.swift
extension UIColor {
public convenience init?(hexString: String) {
let hex = hexString.stringByReplacingOccurrencesOfString("#", withString: "")
let advanceByLength = hex.lengthOfBytesUsingEncoding(NSUTF8StringEncoding) == 3 ? 1 : 2 // Also support #333 pattern
var values = [CGFloat]()
var index = 0
for _ in 0...2 {
You can’t perform that action at this time.