Skip to content

Instantly share code, notes, and snippets.

This python script will find flatpak deduplication size stats.
Made with :heart: by powpingdone#3611, or just powpingdone on github.
Explaination for output:
'no dedupe': The size that the ostree repository would take up if files were not deduplicated.
'dedupe': The actual size of the ostree repository.
'singlet': The size of all files that are referenced once.
'orphan': The size of all files not referenced (ie, only one hard link).
ninjarobot /
Last active May 24, 2022
Trace .NET Core Applications on Linux with `strace`

Trace .NET Core Applications on Linux with strace

Troubleshooting a running application can be difficult, usually it starts around checking log output and then following through the likely code paths to get an idea of where a failure may occur. In a development environment, you might attach a debugger a step through source, but troubleshooting isn't always that convenient. There are several helpful tools that can assist, but one that gives the most comprehensive view of a running application is strace. With strace you are able to see all of the system calls an application makes to get a detailed understanding of what is going on "under the hood" in order to troubleshoot an issue.

Take a simple "hello world" F# application, the kind you get from dotnet new console -lang F# -n strace-sample". Build it with dotnet build and then launch it with strace to get a trace of all the system calls in a file called trace.log(adjusting for your build output path if on a different framework vers

evancz /
Last active Nov 16, 2022
Why do I have to write JSON decoders in Elm?

A vision for data interchange in Elm

How do you send information between clients and servers? What format should that information be in? What happens when the server changes the format, but the client has not been updated yet? What happens when the server changes the format, but the database cannot be updated?

These are difficult questions. It is not just about picking a format, but rather picking a format that can evolve as your application evolves.

Literature Review

By now there are many approaches to communicating between client and server. These approaches tend to be known within specific companies and language communities, but the techniques do not cross borders. I will outline JSON, ProtoBuf, and GraphQL here so we can learn from them all.

flibitijibibo /
Last active Nov 14, 2022
Use this to update a game's FNA installation!
# FNA Update Script
# Written by Ethan "flibitijibibo" Lee
# Released under public domain.
# No warranty implied; use at your own risk.
# Run this script in the game's executable folder.
# This script requires the following programs:
kharrison / String.swift
Last active Dec 16, 2021
Swift String Playground Examples
View String.swift
// Swift Standard Librray - String
// Keith Harrison
// Import Foundation if you want to bridge to NSString
import Foundation
// ====
// Initializing a String
// ====
ohanhi /
Last active Feb 3, 2021
The Joy of Composition - Why stateless rendering is pure bliss

This is a proposal for a lightning talk at the Reactive 2015 conference.

NOTE: If you like this, star the Gist - the amount of stars decides whether it makes the cut!

The Joy of Composition

Why stateless rendering is pure bliss

React just got stateless components, meaning that they are in essence pure functions for rendering. Pure functions make it dead simple - even fun - to refactor your views

imjasonh / markdown.css
Last active Dec 5, 2022
Render Markdown as unrendered Markdown (see
View markdown.css
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
jspahrsummers / GHRunLoopWatchdog.h
Created Jan 28, 2015
A class for logging excessive blocking on the main thread
View GHRunLoopWatchdog.h
/// Observes a run loop to detect any stalling or blocking that occurs.
/// This class is thread-safe.
@interface GHRunLoopWatchdog : NSObject
/// Initializes the receiver to watch the specified run loop, using a default
/// stalling threshold.
- (id)initWithRunLoop:(CFRunLoopRef)runLoop;
/// Initializes the receiver to detect when the specified run loop blocks for
staltz /
Last active Dec 4, 2022
The introduction to Reactive Programming you've been missing