Skip to content

Instantly share code, notes, and snippets.

BIP39 (Mnemonic)
-----------------
# Docs
# https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki
# Reference python impl
# https://github.com/trezor/python-mnemonic
# No C reference impl yet.
Build fails, so I re-run the failing command in the chroot with more logging:
bash-4.3# pwd
/home/user/qubes-src/linux-pvgrub2
bash-4.3# dnf --rpmverbosity debug -v -v -v builddep --setopt=proxy=http://localhost:3128/ -y grub2-xen.spec
cachedir: /var/cache/dnf
Loaded plugins: Query, download, playground, config-manager, debuginfo-install, builddep, protected_packages, noroot, needs-restarting, copr, generate_completion_cache, reposync
DNF version: 1.1.6
repo: using cache for: updates
COLORS = {
'red': ( 255, 0, 0 ),
'orange': ( 255, 140, 0 ),
'yellow': ( 255, 185, 15 ),
'green': ( 0, 255, 0 ),
'gray': ( 192, 192, 192 ),
'blue': ( 0, 0, 255 ),
'purple': ( 159, 121, 238 ),
'black': ( 34, 34, 34 )
}
@jgriffiths
jgriffiths / propset.c
Created February 27, 2016 02:45
hacky program to demonstrate _KDE_NET_WM_COLOR_SCHEME
#include <X11/Xlib.h>
#include <X11/Xos.h>
#include <X11/Xatom.h>
int main(int argc, const char* argv[])
{
Display *d = XOpenDisplay(NULL);
Window w = XCreateSimpleWindow(d, RootWindow(d, 0), 1, 1, 500, 500, 0,
BlackPixel (d, 0), BlackPixel(d, 0));
Atom a;
@jgriffiths
jgriffiths / show_vm.diff
Created February 27, 2016 02:43
KWin: Show Qubes VM name as suffix
diff --git a/atoms.cpp b/atoms.cpp
index 55a8aa3..f5432a4 100644
--- a/atoms.cpp
+++ b/atoms.cpp
@@ -59,6 +59,7 @@ Atoms::Atoms()
, kwin_dbus_service(QByteArrayLiteral("_ORG_KDE_KWIN_DBUS_SERVICE"))
, utf8_string(QByteArrayLiteral("UTF8_STRING"))
, wl_surface_id(QByteArrayLiteral("WL_SURFACE_ID"))
+ , qubes_vm_name(QByteArrayLiteral("_QUBES_VMNAME"))
, m_dtSmWindowInfo(QByteArrayLiteral("_DT_SM_WINDOW_INFO"))