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
<?php | |
define("DEFAULT_URL_SHORTENER_API_URL", "https://www.googleapis.com/urlshortener/v1/url"); | |
function _get_short_url($longUrl) { | |
$curl = curl_init(); | |
$options = array( | |
CURLOPT_CONNECTTIMEOUT => 0, | |
CURLOPT_RETURNTRANSFER => true, | |
CURLOPT_SSL_VERIFYPEER => false, |
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
<?php | |
function _create_url($uri = null) { | |
$url = "http"; | |
switch (true) { | |
case (isset($_SERVER["HTTPS"]) && ($_SERVER["HTTPS"] == "on" || $_SERVER["HTTPS"] === true)): | |
case (isset($_SERVER["HTTP_SCHEME"]) && ($_SERVER["HTTP_SCHEME"] == "https")): | |
case (isset($_SERVER["SERVER_PORT"]) && ($_SERVER["SERVER_PORT"] == 443)): | |
$url .= "s"; |
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
<?php | |
/** | |
* Mailer. | |
* | |
* @author nebiros | |
*/ | |
class Mailer { | |
protected $_mailsFilePath = null; | |
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
// | |
// THTAddThreeThingsTableHeaderView.m | |
// ThreeThings | |
// | |
// Created by Juan Felipe Alvarez Saldarriaga on 3/3/14. | |
// Copyright (c) 2014 3Things. All rights reserved. | |
// | |
#import "THTAddThreeThingsTableHeaderView.h" | |
#import <RHAddressBook/RHPerson.h> |
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
- (void)updateViewConstraints | |
{ | |
[self setupTableViewHeader]; | |
[super updateViewConstraints]; | |
} | |
- (void)viewDidLayoutSubviews | |
{ | |
[super viewDidLayoutSubviews]; | |
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
var Parse = require("parse").Parse; | |
Parse.initialize( | |
"", // applicationId | |
"", // javaScriptKey | |
"" // masterKey | |
); | |
var query = new Parse.Query(Parse.Installation) | |
, data = { |
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
// An implementation. | |
- (void)viewWillDisappear:(BOOL)animated | |
{ | |
[super viewWillDisappear:animated]; | |
// if (!self.isThingsSaved) { | |
// [self saveThings]; | |
// } | |
[self saveThings]; |
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
Undefined symbols for architecture armv7s: | |
"_OBJC_CLASS_$_MKMapView", referenced from: | |
l244 in SparkInspector(SparkInspector) | |
ld: symbol(s) not found for architecture armv7s | |
clang: error: linker command failed with exit code 1 (use -v to see invocation) |
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
NSArray *recordIds = [self.people valueForKey:@"recordID"]; | |
NSMutableArray *arr = [NSMutableArray arrayWithCapacity:[recordIds count]]; | |
for (id recordId in recordIds) { | |
NSLog(@"recordId 1, %@", recordId); | |
NSLog(@"recordId 2, %@", @((ABRecordID) recordId)); | |
NSLog(@"recordId 3, %d", (ABRecordID) recordId); | |
NSLog(@"recordId 4, %@", [NSNumber numberWithInt:(ABRecordID) recordId]); | |
ABRecordID r = (ABRecordID) recordId; | |
[arr addObject:[NSNumber numberWithInt:r]]; | |
} |
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 "MyViewController.h" | |
#import "UIViewController+JIMBackButton.h" | |
@interface MyViewController () | |
@end | |
@implementation MyViewController | |
#pragma mark - UIViewController |