Skip to content

Instantly share code, notes, and snippets.

@andreas-mausch
andreas-mausch / Samsung Tizen Developer Certificate (Author and Distributor)
Created October 5, 2021 08:38
Generate certificates on CLI without installing the full Tizen Studio
# Get access token here:
# https://account.samsung.com/accounts/TDC/signInGate?clientId=4fb7fnf3np&tokenType=TOKEN
# Find the CA certificates here:
# https://gitlab.com/andreas-mausch/moonwatch/-/tree/master/certificates
# Author certificate
openssl genrsa -out author.key.pem 2048
openssl rsa -in author.key.pem -outform PEM -pubout -out author.key.pem.pub
openssl req -new -key author.key.pem -out author.csr -subj "/CN=gear-certificate@protonmail.com"
@andreas-mausch
andreas-mausch / Main.kt
Created October 14, 2018 20:18
kotlin-native-gtk3
import kotlinx.cinterop.*
import gtk3.*
// Note that all callback parameters must be primitive types or nullable C pointers.
fun <F : CFunction<*>> g_signal_connect(obj: CPointer<*>, actionName: String,
action: CPointer<F>, data: gpointer? = null, connect_flags: GConnectFlags = 0u) {
g_signal_connect_data(obj.reinterpret(), actionName, action.reinterpret(),
data = data, destroy_data = null, connect_flags = connect_flags)
}
@andreas-mausch
andreas-mausch / github-starred-downloader.py
Last active August 18, 2018 21:55
Download all starred GitHub repos
#!/usr/bin/env python
import datetime
import logging
import requests
from plumbum import cli
from plumbum import local
from requests.auth import HTTPBasicAuth
logging.basicConfig(format="%(asctime)s %(message)s", datefmt="%Y-%m-%d %H:%M:%S")