Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash -x
echo wokkawokka

Keybase proof

I hereby claim:

  • I am kbussell on github.
  • I am kbussell (https://keybase.io/kbussell) on keybase.
  • I have a public key whose fingerprint is B4D5 BE0C 2CAE 41DB 3614 46D5 7F86 0EA0 5A34 5886

To claim this, I am signing this object:

from django.db import models
from django.utils.functional import curry
class PrivateFieldDescriptor(object):
def __init__(self, field):
self.field = field
def __get__(self, instance, type=None):
if instance is None:
In [1]: j = JsonModel.objects.create(data={'some': 'data'})
In [2]: j.id
Out[2]: 1
In [3]: repr(j.data)
Out[3]: "{'some': 'data'}"
In [4]: j.save()
@kbussell
kbussell / ctrlTap.lua
Last active February 13, 2021 17:46
Send escape key if the ctrl key is tapped. (Used along side remapping my Caps Lock key to ctrl) Thanks to @asmagill 's examples for a starting point.
local alert = require("hs.alert")
local timer = require("hs.timer")
local eventtap = require("hs.eventtap")
local events = eventtap.event.types
local module = {}
-- timeout for ctrol key
module.timeFrame = .25
@kbussell
kbussell / openfile.py
Last active May 11, 2020 17:14
open file references from terminal text
#!/home/keith/.pyenv/shims/python3
import logging
import os
import re
import subprocess
php_re = re.compile(r"(.+)/(\w+\.php)\((\d+)\)")
LOCAL_ROOT = "/home/keith/Projects/tradesy/core"