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
/* | |
* Background gradient generated using ColorZilla | |
* http://www.colorzilla.com/gradient-editor | |
*/ | |
body { | |
background: #dddedd; | |
background: -moz-linear-gradient( -45deg, #dddedd 0%, #d5d6d6 100% ); | |
background: -webkit-linear-gradient( -45deg, #dddedd 0%, #d5d6d6 100% ); | |
background: -o-linear-gradient( -45deg, #dddedd 0%, #d5d6d6 100% ); | |
background: -ms-linear-gradient( -45deg, #dddedd 0%, #d5d6d6 100% ); |
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
var MILLIS_DAY = 24 * 60 * 60 * 1000; | |
var MILLIS_HOUR = 60 * 60 * 1000; | |
var MILLIS_MINUTE = 60 * 1000; | |
var MILLIS_MONTH = 30 * 24 * 60 * 60 * 1000; | |
var MILLIS_YEAR = 31557600000; | |
function getAge( birthday ) | |
{ | |
var days = null; | |
var difference = null; |
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
<?php | |
$username = "_USER_NAME_"; | |
$password = "_PASSWORD_"; | |
$token = "_TOKEN_"; | |
$dbid = "_DATABASE_ID_"; | |
$access = authenticate( $username, $password ); | |
$survey = questions( $dbid, $token, $access["ticket"] ); |
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
- ( void ) sendTwilioTextMessage : ( NSString * ) toNumber withBody : ( NSString * ) body | |
{ | |
NSArray * items; | |
NSData * post; | |
NSError * error; | |
NSHTTPURLResponse * response; | |
NSMutableURLRequest * request; | |
NSString * contents; | |
NSXMLDocument * doc; | |
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
- ( void ) createAndWriteXMLDocument : ( NSString * ) fileName | |
{ | |
NSArray * directories; | |
NSData * output; | |
NSFileManager * manager; | |
NSMutableString * path; | |
NSXMLDocument * doc; | |
NSXMLElement * root; | |
NSXMLNode * first; | |
NSXMLNode * last; |
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
- ( void ) loadAndParseXMLFile : ( NSString * ) url | |
{ | |
NSArray * items; | |
NSArray * query; | |
NSError * error; | |
NSXMLDocument * doc; | |
NSXMLNode * item; | |
// XPath for the win! | |
doc = [[NSXMLDocument alloc] initWithContentsOfURL : [NSURL URLWithString : url] options : ( NSXMLNodePreserveWhitespace | NSXMLNodePreserveCDATA ) error : &error]; |
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
- ( NSString * ) loadFileHTTPFormPost : ( NSString * ) url withFormData : ( NSDictionary * ) parameters | |
{ | |
NSData * post; | |
NSError * error; | |
NSHTTPURLResponse * response; | |
NSMutableString * location; | |
NSMutableURLRequest * request; | |
NSString * contents; | |
NSString * form; | |
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
- ( NSString * ) encodeDictionary : ( NSDictionary * ) parameters | |
{ | |
NSMutableString * query; | |
query = [[NSMutableString alloc] init]; | |
[parameters enumerateKeysAndObjectsUsingBlock : ^( id key, id value, BOOL *stop ) { | |
[query appendFormat : @"%@=%@&", key, value]; | |
}]; | |
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
- ( NSString * ) loadFileHTTPGet : ( NSString * ) url | |
{ | |
NSArray * crayola; | |
NSArray * parts; | |
NSData * get; | |
NSError * error; | |
NSHTTPURLResponse * response; | |
NSMutableURLRequest * request; | |
NSString * contents; | |
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
- ( NSArray * ) parseJSONContent : ( NSString * ) fileName | |
{ | |
NSArray * colors; | |
NSArray * directories; | |
NSData * buffer; | |
NSError * error; | |
NSFileHandle * handle; | |
NSFileManager * manager; | |
NSMutableString * path; | |
NSString * blue; |
OlderNewer