Skip to content

Instantly share code, notes, and snippets.

View cgwalters's full-sized avatar
👍
LGTM

Colin Walters cgwalters

👍
LGTM
View GitHub Profile
@cgwalters
cgwalters / soup-get.c
Last active July 7, 2016 15:05
Version of libsoup/examples/get.c with client certificate support ( https://bugzilla.gnome.org/show_bug.cgi?id=768524 ) but WWW-Neotitate stripped to build on older libsoup
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright (C) 2001-2003, Ximian, Inc.
* Copyright (C) 2013 Igalia, S.L.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@cgwalters
cgwalters / gist:169349fd1c06fd4fb4d3a7ce33303222
Last active March 3, 2023 17:55
Benchmark OpenSSL SHA256 vs GLib
/*
$ gcc -O2 $(pkg-config --cflags --libs openssl glib-2.0) -Wall -o sha256-bench-openssl sha256-bench-openssl.c
$ ./sha256-bench-openssl
openssl: 3900 msec
glib: 7950 msec
speedup: 2.04
$
*/
#define _GNU_SOURCE 1
Release 2017.4
Things are starting to ramp up notably for rpm-ostree. This
release fixes a number of bugs; for example, installing `mock` on
the host now works.
Issue: https://github.com/projectatomic/rpm-ostree/issues/671
We also fixed a regression related to GPG from 2017.3 that affects
COPR notably.
Issue: https://github.com/projectatomic/rpm-ostree/issues/715

This doc is version managed at: https://gist.github.com/cgwalters/c69bf2091eab7c1af316d0d7dd41f530

There’s an effort in Fedora called “Modularity” that effectively gives allows multiple lifecycles for different components.

Today (and since the start), Fedora Atomic Host is Fedora - we have just added another build process at the end of the "Everything" build process (and the same is true of the registry.fedoraproject.org/fedora container). There's a lot of benefits to that; any security fixes to e.g. glibc or openssl automatically

@cgwalters
cgwalters / gist:0df0d15199009664549618c2188581f0
Last active October 14, 2017 14:05
Benchmark read() vs g_input_stream_read() at 3 block sizes: 128KiB, 4KiB, 1KiB
@cgwalters
cgwalters / git-shortlog-with-prs
Last active December 4, 2017 18:25
git-shortlog-with-prs
#!/usr/bin/env python3
# Copyright 2017 Colin Walters <[email protected]>
# Licensed under the new-BSD license (http://www.opensource.org/licenses/bsd-license.php)
import os, re, sys
import subprocess
import tempfile
import hashlib
import argparse

rpm-ostree cancel

It's interesting that most package management tools are command lines (as opposed to daemons with a client, or shared libraries). Instead there's e.g. PackageKit or apt-daemon which layer on top.

Being a command line is good for a lot of scenarios; for example docker build and RUN yum -y .... But ironically, managing the host system is really where you want a daemon by default.

@cgwalters
cgwalters / playground.rs
Created June 10, 2018 12:59 — forked from rust-play/playground.rs
Code shared from the Rust Playground
fn f<T: AsRef<str>>(args: &[T])
{
let bargv = &["foo", "bar"];
let nargv : Vec<&str> = bargv.iter().map(|&v|v).chain(args.iter().map(AsRef::as_ref)).collect();
println!("{:?}", nargv);
}
fn main() {
let args : Vec<String> = std::env::args().collect();
f(&args);
```
$ oc version
oc v4.0.0-alpha.0+0f29e01-822
kubernetes v1.11.0+0f29e0179c
features: Basic-Auth GSSAPI Kerberos SPNEGO