Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Erik Evenson ErikEvenson

🎯
Focusing
View GitHub Profile
@dhoerl
dhoerl / KeychainItemWrapper.h
Last active Jul 30, 2020
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.
View KeychainItemWrapper.h
/*
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
@percyperez
percyperez / create_api_key.py
Created Jun 4, 2013
Signal function to auto-create ApiKey objects when using tastypie ApiKeyAuthentication.
View create_api_key.py
# 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 Oct 15, 2012
Table-based formset rendering
View field.html
{% load crispy_forms_field %}
{% if field.is_hidden %}
{{ field }}
{% else %}
{% crispy_field field %}
{% endif %}
You can’t perform that action at this time.