Skip to content

Instantly share code, notes, and snippets.

View wjt's full-sized avatar

Will Thompson wjt

View GitHub Profile
@wjt
wjt / bgo-790638.py
Last active November 22, 2017 13:06
#!/usr/bin/env python3
import argparse
import contextlib
import logging
import os
import subprocess
import tempfile
import time
from gi.repository import GLib, Gio
% diff -ru /tmp/{scalable-apps,symbolic-apps}
--- /tmp/scalable-apps 2017-11-30 17:19:53.081007578 +0000
+++ /tmp/symbolic-apps 2017-11-30 17:20:03.243013090 +0000
@@ -1,6 +1,6 @@
-[scalable/apps]
-MinSize=1
-Size=128
-MaxSize=256
+[symbolic/apps]
+MinSize=8
@wjt
wjt / foo.c
Created January 22, 2018 14:56
#include <stdio.h>
int main()
{
printf ("sizeof(\"\\x00g\"): %d\n", sizeof ("\x00g"));
printf ("sizeof(\"\\x00f\"): %d\n", sizeof ("\x00f"));
printf ("\"\\x00f\"[0, 1]: %x, %x\n", "\x00f"[0], "\x00f"[1]);
return 0;
}
gelf ~
% flatpak --version
Flatpak 0.10.3
gelf ~
% flatpak remote-add --verbose --ostree-verbose --user flathub-local https://dl.flathub.org/repo/
F: Opening user flatpak installation at path /home/wjt/.local/share/flatpak
F: Fetching summary file for remote ‘flathub-local’
error: GPG verification enabled, but no summary signatures found (use gpg-verify-summary=false in remote config to disable)
$? == 1
@wjt
wjt / test.py
Last active February 7, 2018 15:41
#!/usr/bin/env python3
import logging
class Foo(object):
def __init__(self):
self.str_called = False
def __str__(self):
self.str_called = True
@wjt
wjt / Makefile
Last active February 20, 2018 16:22
all: foo
foo: foo.c libbar.so
gcc -L. -o foo foo.c -lbar
libbar.so: libbar.c libbar.h
gcc -shared -o libbar.so -fPIC libbar.c

Here is the delta, excluding po/, from our current master branch and the rebased & slightly squashed branch, which now has 162 patches on top of upstream tag 3.26.0, down from 197 non-merge commits between Version_3.24.2 and current master. Of those 35 patches, some were already upstream (either verbatim or tweaked), and others were squashed:

  • "live-chooser: remove reference to CcLanguageChooser", "setup-live-user: taskbar-pins → favorite-apps", "live-chooser: update eos-installer desktop filename": squashed into "live-chooser: add the Live Chooser page"
  • Removed these pairs of patch + revert:
    • Revert "password: Enable Show Password by default"
    • password: fix wrong type in function signature
  • Revert "password: fix wrong type in function sig
#include <glib.h>
static gboolean
asv_equal_ignoring_order (GVariant *one,
GVariant *two)
{
GVariantIter one_iter;
GVariantDict two_dict;
const gchar *one_key;
GVariant *one_value;
#!/bin/sh
set -e
readonly a=1
a=2
@wjt
wjt / y.sh
Last active June 8, 2018 08:45
#!/bin/dash
set -e
readonly a=1
a=2
echo not reached