This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scott@scott:~$ sudo hcitool scan | |
Scanning ... | |
00:81:22:78:00:67 MY780067 | |
scott@scott:~$ sudo rfcomm bind /dev/rfcomm1 00:81:22:78:00:67 1 | |
scott@scott:~$ ls -l /dev/rfcomm1 | |
crw-rw---- 1 root dialout 216, 1 Aug 17 01:00 /dev/rfcomm1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "NSObject+IsEmpty.h" | |
@implementation NSObject (IsEmpty) | |
- (BOOL)isEmpty | |
{ | |
return self == nil | |
|| (self == [NSNull null]) | |
|| ([self respondsToSelector:@selector(length)] | |
&& [(NSData *) self length] == 0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
from django.contrib.auth import get_user_model, authenticate | |
from django.core.exceptions import ValidationError | |
from django.core.validators import validate_email | |
from tastypie.authentication import Authentication | |
from tastypie.http import HttpUnauthorized | |
class TastyEmailAuthentication(Authentication): | |
def __init__(self, realm='django-tastypie', **kwargs): |