Skip to content

Instantly share code, notes, and snippets.

Ray Besiga raybesiga

Block or report user

Report or block raybesiga

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@raybesiga
raybesiga / gist:6ed1a9bcaf079df67ee6
Created Nov 2, 2015 — forked from TimFletcher/gist:034e799c19eb763fa859
Django template filter to add attributes to form fields
View gist:6ed1a9bcaf079df67ee6
# From http://vanderwijk.info/blog/adding-css-classes-formfields-in-django-templates/#comment-1193609278
from django import template
register = template.Library()
@register.filter(name='add_attributes')
def add_attributes(field, css):
attrs = {}
definition = css.split(',')
@raybesiga
raybesiga / unload-keyboard
Last active Aug 29, 2015 — forked from JohnMurray/unload-keyboard
Disable Mac OS X Keyboard (built-in only)
View unload-keyboard
#!/bin/bash
# Unload the keyboard so I can use my external keyboard
# and not worry about accidentally pressing buttons on
# the built-in. This may not be a problem for you but, you
# should see my desk sometimes (Oh no!!) ;-)
sudo kextunload /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext/
You can’t perform that action at this time.