Skip to content

Instantly share code, notes, and snippets.

View lalomartins's full-sized avatar

Lalo Martins lalomartins

View GitHub Profile

Keybase proof

I hereby claim:

  • I am lalomartins on github.
  • I am lalomartins (https://keybase.io/lalomartins) on keybase.
  • I have a public key ASAqhMFeAsitHtsVChG3de-cJ7EUQOmV7J3aiQN4Le68NQo

To claim this, I am signing this object:

@lalomartins
lalomartins / resilverprogress.py
Last active August 29, 2015 14:25
Watch progress of a zpool (zfs) resilver — Python 3, Qt5
#!/usr/bin/env python3
import re, subprocess, sys
from PyQt5.QtCore import Qt, QTimer
from PyQt5.QtWidgets import (
QApplication,
QWidget,
QLabel,
QProgressBar,
#!/bin/sh
set -e
VERSION="$1"
shift
for bin in "$@"; do
binpath=$(realpath -s "${bin}")
echo "${binpath} -> ${VERSION}"
--- window-list~ 2014-10-28 07:08:48.000000000 +0100
+++ window-list 2015-06-11 04:05:44.408806718 +0200
@@ -70,6 +70,7 @@
self.ind = appindicator.Indicator('window-list',
APP_NAME,
appindicator.CATEGORY_SYSTEM_SERVICES)
+ self.ind.set_ordering_index(0xffffffff)
self.ind.set_status(appindicator.STATUS_ACTIVE)
self.ind.set_icon('window-list')
self.ind.set_attention_icon('window-list')
@lalomartins
lalomartins / loop test
Created May 8, 2015 00:49
test for mysterious Loop() method
from __future__ import print_function
import time
done = [False]
class Test(object):
def __init__(self):
self.loopfunctions = []
def SetLoopCallback(self, function):