Skip to content

Instantly share code, notes, and snippets.

View ntninja's full-sized avatar

Erin Yuki Schlarb ntninja

View GitHub Profile
@ntninja
ntninja / letsencrypt.pem
Created June 16, 2016 21:36
Let's encrypt certificate chain
-----BEGIN CERTIFICATE-----
MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/
MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT
DkRTVCBSb290IENBIFgzMB4XDTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVow
PzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMRcwFQYDVQQD
Ew5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
AN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmTrE4O
rz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEq
OLl5CjH9UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9b
xiqKqy69cK3FCxolkHRyxXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw
import java.text.Normalizer;
// Hall of fame:
// - https://en.wikipedia.org/w/index.php?oldid=674250888 (279 reasons why you should prefer this method)
// - http://www.unicode.org/reports/tr15/tr15-23.html (Explanation of different Unicode normalization forms)
// - http://stackoverflow.com/a/361345/277882 (How to iterate over 20-bit Unicode string in Java)
// - http://stackoverflow.com/a/29111105/277882 (How to check for combining characters in Java)
class StripAccents {
public static void main(String[] args) {
#!/usr/bin/python3
import os
import sys
import time
import dbus
import dbus.service
import dbus.mainloop.glib
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
from gi.repository import GObject as gobject