Skip to content

Instantly share code, notes, and snippets.

Avatar
🦘

James Henstridge jhenstridge

🦘
View GitHub Profile
@jhenstridge
jhenstridge / signal-test.go
Last active Jun 21, 2019
Demonstrate godbus RemoveSignal panic
View signal-test.go
package main
import (
"fmt"
"log"
"time"
"github.com/godbus/dbus"
)
@jhenstridge
jhenstridge / passthrough-backend.c
Created Oct 30, 2018
A passthrough GSettings backend (with broken change signalling)
View passthrough-backend.c
#define G_SETTINGS_ENABLE_BACKEND
#include <gio/gio.h>
#include <gio/gsettingsbackend.h>
typedef GSettingsBackendClass PassthroughSettingsBackendClass;
typedef struct _PassthroughSettingsBackend PassthroughSettingsBackend;
struct _PassthroughSettingsBackend
{
GSettingsBackend backend;
@jhenstridge
jhenstridge / snapcraft.yaml
Created Jul 4, 2018
Using the gtk-common-themes snap
View snapcraft.yaml
name: gtk3-demo
version: '0.1'
summary: A demonstration application for features of GTK
description: |
This snap contains the gtk3-demo application, using theme data
provided by one or more external snaps.
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: strict
@jhenstridge
jhenstridge / README.md
Last active Nov 19, 2018
Snap desktop application theming experiment
View README.md
  1. Build all snaps

  2. Install all snaps

  3. Connect interfaces:

    snap connect gtk3-demo:gtk3-themes ubuntu-themes:gtk3-themes
    snap connect gtk3-demo:icon-themes ubuntu-themes:icon-themes
    snap connect gtk3-demo:gtk3-themes adwaita-theme:gtk3-themes
@jhenstridge
jhenstridge / gvt-preferences.md
Last active Feb 13, 2017
Simplified preferences from group voting tickets for 2017 WA State Election
View gvt-preferences.md

Agricultural

Party Preferences
Liberal Party LIB, ONP, NAT, ALP, GRN
Pauline Hanson's One Nation ONP, LIB, NAT, ALP, GRN
The Greens (WA) GRN, ALP, NAT, LIB, ONP
THE NATIONALS NAT, LIB, GRN, ALP, ONP
WA Labor ALP, GRN, NAT, LIB, ONP

East Metropolitan

@jhenstridge
jhenstridge / unpdf.py
Created Feb 13, 2017
Convert the group voting ticket file for the 2017 WA State Election from PDF to CSV
View unpdf.py
#!/usr/bin/python3
# Convert the group voting ticket file for the 2017 WA State Election
# from PDF to CSV.
#
# https://www.elections.wa.gov.au/elections/state/sgelection#/sg2017
import csv
import re
import subprocess