Skip to content

Instantly share code, notes, and snippets.

@MoralCode
MoralCode / Grayjay-rendering-options.md
Last active July 30, 2025 01:24
A writeup of grayjay rendering options from most to least practical. From https://github.com/futo-org/Grayjay.Desktop/issues/213

Here's some rough ideas for actionable improvements that I see being useful when it comes to graphical framework fixes to grayjay, listed with the most feasible ones first:

0. Identify solutions to the issues mentioned that could be patched in the flatpak

If anyone digs into the issues listed in the original issue description enough to be able to demonstrate a particular patch that solves the issue and can be applied to the grayjay flatpak distribution, I would be happy to take a look at it and merge it until it is able to be upstreamed for all Grayjay users.

1. Upgrade dotcefnative from GTK3 to GTK4

upgrading dotcefnative (i.e. the source code in the native directory of the JustCef repo, which is essentially a CEF/chromium embedded wrapper) from GTK3 to GTK4. This essentially means getting things to the point that the --use-native flag (which is one of the custom things added by the dotcefnative wrapper) is able to support linux desktop environments.

#!/usr/bin/python
# Usage: first run your apple health export through the scripts as documented in https://github.com/markwk/qs_ledger/tree/master/apple_health
# then run this script using the BodyMass.csv from this process to get an OpenScale csv
import argparse
import csv
import datetime
from dateutil.parser import parse as parsedate
@MoralCode
MoralCode / Pipfile
Last active February 23, 2021 05:06
mp3gifmerge
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
ffmpeg-python = "*"
[dev-packages]
@MoralCode
MoralCode / filter-by-image-width.sh
Last active January 30, 2021 03:57
A short bash script that non-recursively moves the current directory (which must contain all image files) based on their width.
rejectdir="../reject/lowres"
for filename in *
do
width=`identify -format "%w" $filename`
if [ $width -ne 2000 ]
then
mv "$filename" "$rejectdir"
bug: bug.c
gcc bug.c -lvc -o bug
@MoralCode
MoralCode / optimal_tsp.py
Last active May 7, 2019 17:33 — forked from westphahl/optimal_tsp.py
TSP brute-force solution in python3
"""
Author: Simon Westphahl <[email protected]>
Description: Brute-force implementation for solving the TSP.
http://en.wikipedia.org/wiki/Travelling_salesman_problem
"""
routes = []
@MoralCode
MoralCode / MetricTime-Core.swift
Last active October 25, 2016 01:59
This is the very core of my MetricTime prank app which can be used/repurposed to convert regular time to Metric Time.
//This is the very core of my MetricTime prank app which can be used/repurposed to convert regular time to Metric Time.
//See the full app here: https://github.com/DeveloperACE/MetricTime
func convertTime(inputTime: (hour: Int, minute: Int, second: Int), toMetric:Bool = true) -> (hour: Int, minute: Int, second: Int) {
var millisecondsSinceToday = 0
var convertedTime = (hour: 0, minute: 0, second: 0)
if toMetric {