Skip to content

Instantly share code, notes, and snippets.

View kimmoli's full-sized avatar

Kimmo Lindholm kimmoli

View GitHub Profile
@kimmoli
kimmoli / kello.py
Created September 6, 2023 04:01
Desktop clock - Työpöytäkello
# Näyttää työpöydän vasemmassa yläkulmassa punaisella tekstillä kellonajan läpinäkyvällä taustalla
# Ikkunan kehyksen saa näkyviin kellonaikaa klikkaamalla
#
# Vapautettu yleiseen käyttöön (public domain)
# Osittian luotu käyttäen ChatGPT versiota 3.5, mukaanlukien kommentit
import tkinter as tk
from time import strftime
overrideredirect = True
C:\PROG\IAR\V440A\EXE>BNKSETUP.EXE
Welcome to the 64180/Z818X bank setup utility.
Your logical 64K memory map is divided in 3 parts:
1. A root code area (Common area 0) which will hold
interrupts, non-banked functions and assembly support
routines. This block starts at address 0x0000
2. A bank area which will hold your banked C code.
3. A fixed data area (Common area 1) which starts above
the bank are and ends at 0xFFFF. This is where you
/* C++ */
typedef struct {
unsigned long address;
unsigned long length;
unsigned char * data;
} ELEMENT, *PELEMENT;
unsigned long SetElement(ELEMENT Element);
/* C# */
@kimmoli
kimmoli / Kt.txt
Created August 16, 2019 17:02
Kt
| SailfishOS 2.1.0.11 (Iijoki) (armv7hl)
'---
[nemo@Sailfish ~]$ harbour-kitchentimer
[D] unknown:0 - Using Wayland-EGL
[W] unknown:0 - Defaulting to webview scaling factor
of 1.0
[W] unknown:89 - file:///usr/share/harbour-kitchentim
er/qml/harbour-kitchentimer.qml:89:18: Type TimerPage
unavailable
initialPage: TimerPage {
@kimmoli
kimmoli / gerrit_with_ldaps_auth.md
Created November 1, 2018 14:26 — forked from stefanozanella/gerrit_with_ldaps_auth.md
Configuring SSL certificate / private key pair in Gerrit to talk with LDAPS backend

Making Gerrit and LDAP speak in tongues together via SSL

If you're an experienced Java developer or container/AS user, you'll probably want to just skip this, since it involves just some Java tools and standards techniques.
If you, however, like me, have only scratched the surface of the ceremony of the Java world (no troll intended), then you can probably find this useful, since I couldn't find proper documentation about this but had to assembly it together from various sources.

I started to configure a Gerrit instance on our company's server to start putting a bit of order in the mess that is our structure by now. Since the instance is private, I didn't want to enable OpenID authentication, nor I wanted to set it in development mode (aka everyone's invited). Having to choose between offloading authentication to an HTTP proxy and setting up an LDAP backend, I opted for the latter. Also, to complicate things further, I have not only enabled SSL support on the LDAP server, but I required _strict client c

import QtQuick 2.0
import Sailfish.Silica 1.0
import org.nemomobile.dbus 2.0
Page
{
property var stepsNow: 0
Component.onCompleted:
{
@kimmoli
kimmoli / Moi.qml
Last active January 26, 2019 18:18
Moi
Page
{
Button
{
text: "moi"
anchors.centerIn: parent
onClicked: t.start()
}
Timer
@kimmoli
kimmoli / blinky.qml
Last active February 19, 2018 20:52
Jep
Page {
Rectangle {
id: rect
anchors.fill: parent
color: "white"
opacity: 1.0
Behavior on opacity {
NumberAnimation {
duration: 450
easing.type: Easing.InOutQuad
@kimmoli
kimmoli / Keystest.qml
Last active June 3, 2017 13:47
Keystest
import QtQuick 2.0
import Sailfish.Media 1.0
Page
{
MediaKey { enabled: true; key: Qt.Key_MediaTogglePlayPause; onReleased: console.log("playPause") }
MediaKey { enabled: true; key: Qt.Key_MediaPlay; onReleased: console.log("play") }
MediaKey { enabled: true; key: Qt.Key_MediaPause; onReleased: console.log("pause") }
}
// ==UserScript==
// @name reload monitor
// @namespace rradb
// @include https://build.merproject.org/project/monitor/*
// @version 1
// @grant none
// ==/UserScript==
setTimeout(function(){ location.reload(); }, 10*1000);