Skip to content

Instantly share code, notes, and snippets.

View ErikEvenson's full-sized avatar
🎯
Focusing

Erik Evenson ErikEvenson

🎯
Focusing
View GitHub Profile
@percyperez
percyperez / create_api_key.py
Created June 4, 2013 04:15
Signal function to auto-create ApiKey objects when using tastypie ApiKeyAuthentication.
# models.py
# Work around the ImportError: cannot import name create_api_key
# Issue https://github.com/toastdriven/django-tastypie/issues/937
class User(AbstractUser):
field1
...
@receiver(post_save, sender=User)
def create_user_api_key(sender, **kwargs):
@gerardo
gerardo / field.html
Created October 15, 2012 15:22
Table-based formset rendering
{% load crispy_forms_field %}
{% if field.is_hidden %}
{{ field }}
{% else %}
{% crispy_field field %}
{% endif %}
@dhoerl
dhoerl / KeychainItemWrapper.h
Last active April 4, 2023 08:15
KeychainItemWrapper ARCified. Added the ability to manage a dictionary in place of just a string - the #define PASSWORD_USES_DATA in the .m file switches the mode.
/*
File: KeychainItemWrapper.h
Abstract:
Objective-C wrapper for accessing a single keychain item.
Version: 1.2 - ARCified
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple
Inc. ("Apple") in consideration of your agreement to the following
terms, and your use, installation, modification or redistribution of