Skip to content

Instantly share code, notes, and snippets.

View elboulangero's full-sized avatar

Arnaud Rebillout elboulangero

View GitHub Profile
@elboulangero
elboulangero / gist:d67f8b97f0fd7f3d125131b872e0b136
Created December 13, 2018 19:56
ovmf/edk2 patch to make it allow enrolling keys with efitools
--- a/SecurityPkg/Library/AuthVariableLib/AuthService.c
+++ b/SecurityPkg/Library/AuthVariableLib/AuthService.c
@@ -1908,6 +1908,7 @@
// in VARIABLE_AUTHENTICATION_2 descriptor.
// This field has the fixed offset (+13) and be calculated based on two bytes of length encoding.
//
+#if 0
if ((Attributes & EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS) != 0) {
if (SigDataSize >= (13 + sizeof (mSha256OidValue))) {
if (((*(SigData + 1) & TWO_BYTE_ENCODE) != TWO_BYTE_ENCODE) ||
/*
* Compile with:
* gcc $(pkg-config --cflags gtk+-3.0) *.c $(pkg-config --libs gtk+-3.0) -lm
*
* When Gtk is initialized through option group, launching the interactive
* debugger doesn't work.
* To test, just comment/uncomment the `#define USE_GTK_INIT`, rebuild, run:
*
* GTK_DEBUG=interactive ./a.out
*/
@elboulangero
elboulangero / gtk-expander-set-expanded.c
Created November 9, 2016 09:40
GtkExpander seems broken when expanded manually
/*
* Compile with:
* gcc $(pkg-config --cflags gtk+-3.0 --libs gtk+-3.0) -lm *.c
*/
#include <stdlib.h>
#include <glib.h>
#include <gtk/gtk.h>
#define EXPANDED
@elboulangero
elboulangero / gtk-tree-view-row-activated.c
Last active September 26, 2016 10:29
GtkTreeView inconsistent 'row-activated' signal emission before drag'n'drop, 'activate-on-single-click'=TRUE, 'reorderable'=TRUE
/*
* Compile with:
* gcc $(pkg-config --cflags gtk+-3.0 --libs gtk+-3.0) -lm gtk-tree-view-row-activated.c -o gtk-tree-view-row-activated
*/
#include <stdlib.h>
#include <math.h>
#include <glib.h>
#include <gtk/gtk.h>