Skip to content

Instantly share code, notes, and snippets.

@Stebalien
Stebalien / lazy.py
Created December 21, 2011 05:25
Lazily Evaluated Variable
def lazy(func):
def get(self):
val = func(self)
setattr(self, func.func_name, val)
return val
def set(self, val):
setattr(self, func.func_name, val)
return property(get, set)
@Stebalien
Stebalien / html5notifications.js
Created July 27, 2012 21:20
HTML5 Notification Compatibility Interface
/**
* An implementation of the HTML5 desktop notification spec in HTML.
* @see: http://www.w3.org/TR/notifications/
*
* Requires jQuery because I am lazy.
*
* Copyright (c) 2012 Steven Allen
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
@Stebalien
Stebalien / gist:3651142
Created September 6, 2012 04:15
Physlock issue2 systemd-cgls output
├ user
│ └ steb
│ ├ 3
│ │ ├ 21920 login -- steb
│ │ ├ 21928 /usr/bin/tmux attach
│ │ ├ 21938 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --...
│ │ ├ 21940 gnome-keyring-daemon -s --components=pkcs11,secrets
│ │ └ 21946 gpg-agent --daemon --enable-ssh-support
│ ├ 2
│ │ ├ 11298 lightdm --session-child 12 19
@Stebalien
Stebalien / g15daemon.service
Created October 9, 2012 00:41 — forked from jinks/g15daemon.service
g15daemon unit file for systemd
[Unit]
Description=A daemon that makes it possible to use the G-Buttons and draw on the G15 LCD
Documentation=man:g15daemon(1)
[Service]
Type=forking
PIDFile=/run/g15daemon.pid
ExecStart=/usr/sbin/g15daemon
[Install]
@Stebalien
Stebalien / gist:4026650
Created November 6, 2012 18:43
Hardware/Config Info
============ start debug info ============
libhd version 20.0 (x86-64) [7688]
using /var/lib/hardware
kernel version is 3.6
----- /proc/cmdline -----
root=/dev/sda2 ro add_efi_memmap elevator=noop i915.i915_enable_rc6=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1 pcie_aspm=force nmi_watchdog=0 quiet
----- /proc/cmdline end -----
debug = 0xff7ffff7
probe = 0x1d938fcdaa17fcf9fffe (+memory +pci +isapnp +net +floppy +misc +misc.serial +misc.par +misc.floppy +serial +cpu +bios +monitor +mouse +scsi +usb -usb.mods +modem +modem.usb +parallel +parallel.lp +parallel.zip -isa -isa.isdn +isdn +kbd +prom +sbus +int +braille +braille.alva +braille.fhp +braille.ht -ignx11 +sys -bios.vbe -isapnp.old -isapnp.new -isapnp.mod +braille.baum -manual +fb +pppoe -scan +pcmcia +fork -parallel.imm +s390 +cpuemu -sysfs -s390disks +udev +block +block.cdrom +block.part +edd +edd.mod -bios.ddc -bios.fb -bios.mode +input +block.mods +bios.vesa -cpuemu.debug -scsi.noserial +wlan -bios.crc -hal +bios.vram +bios.acpi -bios.ddc.ports=0 +
@Stebalien
Stebalien / linotify-git.PKGBUILD
Created February 17, 2013 17:08
Cleaned linotify-git PKGBUILD
# Contributor: Will Chappell <mr.chapendi@gmail.com>
# Maintainer: Zsolt Udvari <udvzsolt gmail com>
pkgname=linotify-git
pkgver=20130217
pkgrel=1
pkgdesc="lua bindings to inotify"
arch=('i686' 'x86_64')
url="http://github.com/hoelzro/linotify"
license=('MIT')
depends=(lua)
@Stebalien
Stebalien / gf2x.PKGBUILD
Last active December 16, 2015 04:48
Updated package build for gf2x.
pkgname=gf2x
pkgver=1.1
pkgrel=1
pkgdesc="A library for multiplying polynomials over the binary field"
arch=('i686' 'x86_64')
url="http://gforge.inria.fr/projects/gf2x/"
license=('GPL' 'LGPL')
depends=('glibc')
options=('!libtool')
source=("http://gforge.inria.fr/frs/download.php/30873/gf2x-1.1.tar.gz")
@Stebalien
Stebalien / ntl.PKGBUILD
Last active December 16, 2015 04:49
Updated package build for ntl.
# Maintainer: Brad Conte <brad AT bradconte.com>
pkgname=ntl
pkgver=6.0.0
pkgrel=1
pkgdesc="A Library for doing Number Theory"
arch=('i686' 'x86_64')
url="http://www.shoup.net/ntl/"
license=('GPL')
depends=('gf2x' 'gmp')
options=('!libtool')
@Stebalien
Stebalien / yad.PKGBUILD
Created May 11, 2013 14:31
Fixed up yad PKGBUILD
# Maintainer: trile7 at gmail dot com
# Contributor: Ernia <monghitri@aruba.it>
pkgname=yad
pkgver=0.21.0
pkgrel=1
pkgdesc="A fork of zenity - display graphical dialogs from shell scripts or command line"
url="http://code.google.com/p/yad/"
arch=('x86_64' 'i686')
license=('GPL3')
@Stebalien
Stebalien / aptitude_completion.sh
Created May 23, 2013 04:38
Aptitude bash completions
# Install Completion
#
_aptitude_all()
{
local cur dashoptions
COMPREPLY=()
cur=`_get_cword`
dashoptions='-S -u -i -h --help --version -s --simulate -d \