This file contains 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 simplejson as json | |
from geopy.geocoders.googlev3 import GoogleV3 | |
from urllib import urlopen | |
from django.conf import settings | |
from django.contrib.gis.geos import GEOSGeometry | |
from django.db.models import signals | |
from specials.models import Special |
This file contains 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
DEFAULT_GEO_RADIUS = 50 | |
EARTH_RADIUS_IN_KM = 6371 | |
EARTH_RADIUS_IN_MILES = 3959 | |
if comparator == "within": | |
comparator = "$within" | |
params = value.split(",") | |
if len(params) > 3: |
This file contains 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
#include <sys/xattr.h> | |
const char *filePath = [[storeURL path] fileSystemRepresentation]; | |
const char *attrName = "com.apple.MobileBackup"; | |
u_int8_t attrValue = 1; | |
setxattr(filePath, attrName, &attrValue, sizeof(attrValue), 0, 0); |
This file contains 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 urllib2 | |
import json | |
from twilio.rest import TwilioRestClient | |
EATON_STORE_CODE = "R121" | |
IPHONE6_SILVER_128_CODE = "MG3F2CL/A" | |
IPHONE6_GREY_128_CODE = "MG3E2CL/A" | |
APPLE_RESERVATION_URL = "https://reserve.cdn-apple.com/CA/en_CA/reserve/iPhone/availability.json" |
This file contains 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
// OV7670+FIFO Simple Data Test | |
// | |
// OV7670 Arduino | |
// 3V3 3.3V | |
// GND GND | |
// SYNC 2 | |
// D0-D7 6-13 | |
// | |
void setup() { |
This file contains 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
#include <avr/io.h> | |
#include <avr/interrupt.h> | |
static inline void serialWrB(uint8_t dat){ | |
while(!( UCSR0A & (1<<UDRE0))); //wait for byte to transmit | |
UDR0=dat; | |
while(!( UCSR0A & (1<<UDRE0))); //wait for byte to transmit | |
} | |
static void StringPgm(char * str){ |
This file contains 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
#include <Wire.h> | |
#define OV7670_address 0x21 | |
#ifndef cbi | |
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) | |
#endif | |
#define vga 0 |
This file contains 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
#include <avr/io.h> | |
#include <avr/interrupt.h> | |
// | |
// RCLK 2 | |
// VSYNC 3 | |
// D0-D4 A0-A3 | |
// D5-D8 4-7 | |
// WE 8 | |
// WRST 9 |
This file contains 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
#include <Wire.h> | |
#include <SPI.h> | |
#define OV7670_address 0x21 | |
#ifndef cbi | |
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) | |
#endif |
This file contains 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
#include <avr/io.h> | |
#include <avr/interrupt.h> | |
#include <HardwareSerial.h> | |
#include "SimpleI2C.h" | |
#ifndef cbi | |
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) | |
#endif |