Skip to content

Instantly share code, notes, and snippets.

View cgwalters's full-sized avatar
👍
LGTM

Colin Walters cgwalters

👍
LGTM
View GitHub Profile
Run like this: $ python ~/tmp/foo.py '(a(s(taya{sv}))a{sv})' /srv/rhel-atomic-host/repo/summary
#!/usr/bin/env python
import os,sys
from gi.repository import GLib
typestr = GLib.VariantType.new(sys.argv[1])
data = open(sys.argv[2]).read()
bytedata = GLib.Bytes.new(data)
@cgwalters
cgwalters / gist:73072640f9f19fdc205f
Last active August 29, 2015 14:13
Anonymous docker/rpm assembly tool
#!/usr/bin/env python
import sys,math
buckets = {}
for f in open(sys.argv[1]).readlines():
f.strip()
s,p = f.split(' ', 1)
sz = int(s)
@cgwalters
cgwalters / ostree-mounttest.sh
Last active August 29, 2015 14:14
OSTree mount testing
#!/bin/sh -xe
function umountcleanup() {
umount -R $1 2>/dev/null || true
}
umountcleanup initramfs
rm -f initramfs.img
dd if=/dev/zero of=initramfs.img seek=20M bs=1 count=1
@cgwalters
cgwalters / gist:4188ad4aaa1d971d2eff
Created February 17, 2015 15:59
yum repomirror
$ cat reposync.sh
#!/bin/sh
# Mirror a subset of packages from yum repositories, creating local
# repos for them.
set -e
run() {
echo "$@"
$@
From fc1eede8883bdad29eaaf0fd6d4bdfc5797e5d93 Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Fri, 12 Jun 2015 15:42:29 -0400
Subject: [PATCH] Add two backported patches
First is a critical issue upstream in 7.1.2.
Second is also a breakage specific to Anaconda.
---
...0001-sysroot-Close-sysroot-fd-in-finalize.patch | 27 +++++++
.../sysroot-sort-returned-bootloader-configs.patch | 89 ++++++++++++++++++++++
package main
import (
"io"
"os"
"fmt"
"strings"
)
type rot13Reader struct {

Keybase proof

I hereby claim:

  • I am cgwalters on github.
  • I am walters (https://keybase.io/walters) on keybase.
  • I have a public key whose fingerprint is 1CEC 7A9D F7DA 85AB EF84 3DC0 A866 D7CC AE08 7291

To claim this, I am signing this object:

@cgwalters
cgwalters / public-ssh-keys.md
Last active September 16, 2015 12:59
public-ssh-keys.md

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512

This is a GPG (clear)signed document that I will keep updated with my public SSH keys for general-purpose use.

My GPG key can be found on https://keybase.io/walters (fingerprint: 1CEC7A9DF7DA85ABEF843DC0A866D7CCAE087291)

If you want to give me access to a machine, I recommend using the raw view, and gpg --verify on the document to verify my signature (and not just github's copy):

@cgwalters
cgwalters / f21-annotated-sizes.md
Last active February 1, 2016 20:13
Are we slim yet?

Are we slim yet?

Translations, coreutils also has a lot of static linking of gnulib.

120417342 glibc-common
14623272 coreutils
14000291 glibc