Skip to content

Instantly share code, notes, and snippets.

View adamwg's full-sized avatar

Adam Wolfe Gordon adamwg

View GitHub Profile
@adamwg
adamwg / nmnotify.py
Created March 1, 2012 19:28
inotify for notmuch
# Example: loops monitoring events forever.
#
import pyinotify
from os import system
from time import sleep
def run_nm(notifier):
sleep(1)
system("notmuch new")
return False
@adamwg
adamwg / torrentdl.py
Created November 18, 2012 19:34
torrentdl.py
#!/usr/bin/env python
import cPickle
import feedparser
import os
import os.path
import re
import subprocess
import socket
(defun notmuch-show-previous-thread (&optional show-next)
"Move to the previous item in the search results, if any."
(interactive "P")
(let ((parent-buffer notmuch-show-parent-buffer))
(notmuch-kill-this-buffer)
(when parent-buffer
(switch-to-buffer parent-buffer)
(notmuch-search-previous-thread)
(if show-next
(notmuch-search-show-thread)))))
#!/usr/bin/env python2.7
import sys
import os.path
import argparse
import httplib2
import icalendar
from oauth2client import tools
from oauth2client.client import flow_from_clientsecrets
from oauth2client.file import Storage
[ 304.295586] pci 0000:05:00.0: [8086:15d3] type 01 class 0x060400
[ 304.295638] pci 0000:05:00.0: enabling Extended Tags
[ 304.295717] pci 0000:05:00.0: supports D1 D2
[ 304.295717] pci 0000:05:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[ 304.295923] pci 0000:06:00.0: [8086:15d3] type 01 class 0x060400
[ 304.295978] pci 0000:06:00.0: enabling Extended Tags
[ 304.296053] pci 0000:06:00.0: supports D1 D2
[ 304.296053] pci 0000:06:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[ 304.296152] pci 0000:06:01.0: [8086:15d3] type 01 class 0x060400
[ 304.296207] pci 0000:06:01.0: enabling Extended Tags
@adamwg
adamwg / devex.md
Created October 31, 2025 19:40
Crossplane DevEx: Core and Plugins

Crossplane DevEx: Core and Plugins

I've been thinking about the following two things:

  1. What is most valuable and unique in the Upbound DevEx? I think it's the concept of a Project as an on-disk development artifact encompassing both configuration (XRDs, compositions, operations) and code (functions, tests). Separating the development artifact (project) from the artifact that gets installed into a cluster (xpkg) is powerful.
  2. It sounds like a lot of folks have built their own test frameworks with
@adamwg
adamwg / bucket.go
Created December 3, 2025 21:46
Go codegen example
// Package v1beta2 contains generated models.
//
// Code generated by github.com/upbound/up version v0.40.0-0.rc.2 DO NOT EDIT.
package v1beta2
import (
metav1 "dev.upbound.io/models/io/k8s/meta/v1"
"time"
)