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
/* | |
Basically what we are going to do is use and profit from NSURLRequests being conformant to NSCoding, | |
and a little known API from NSURLProtocol which allows us attach info to requests. | |
*/ | |
//Step 0: For the purpose of this gist, we'll already have a background session setup and assume a bunch of stuff. | |
NSURLSession *bgSession = [NSURLSession magicMethodWhichGivesMeTheAlreadySetupSession]; //Geeez, Methods are long in Obj-C. | |
//IMPORTANT: Request must be mutable in order for this to work. Got an immutable one. Make a copy. Can't? Well, Make it so!. | |
//Step 1: Setup your basic request. |
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
#!/bin/bash | |
## Copyright (C) 2015 Cerebral Gardens http://www.cerebralgardens.com/ | |
## | |
## Permission is hereby granted, free of charge, to any person obtaining a copy of this | |
## software and associated documentation files (the "Software"), to deal in the Software | |
## without restriction, including without limitation the rights to use, copy, modify, | |
## merge, publish, distribute, sublicense, and/or sell copies of the Software, and to | |
## permit persons to whom the Software is furnished to do so, subject to the following | |
## conditions: |
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
static NSString * BCP47LanguageCodeFromISO681LanguageCode(NSString *ISO681LanguageCode) { | |
if ([ISO681LanguageCode isEqualToString:@"ar"]) { | |
return @"ar-SA"; | |
} else if ([ISO681LanguageCode hasPrefix:@"cs"]) { | |
return @"cs-CZ"; | |
} else if ([ISO681LanguageCode hasPrefix:@"da"]) { | |
return @"da-DK"; | |
} else if ([ISO681LanguageCode hasPrefix:@"de"]) { | |
return @"de-DE"; | |
} else if ([ISO681LanguageCode hasPrefix:@"el"]) { |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>SKVariables</key> | |
<array> | |
<dict> | |
<key>enabled</key> | |
<true/> | |
<key>name</key> |
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
UI- and App Frameworks Evangelist - Jake Behrens, behrens@apple.com, twitter: @Behrens | |
- What's new in Cocoa | |
- Accessibility in iOS | |
- Building User Interfaces for iOS 7 | |
- Getting Started with UIKit Dynamics | |
- What's new in Cocoa Touch | |
- What's New With Multitasking | |
- Best Practices for Cocoa Animation | |
- Improving Power Efficiency with App Nap | |
- Introducing Text Kit |
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
static CIImage* ApplyFiltersToImage(NSArray *filters, CIImage *inputImage) | |
{ | |
CIImage *img = inputImage; | |
for (CIFilter *filter in filters) | |
{ | |
[filter setValue:img forKey:kCIInputImageKey]; | |
img = filter.outputImage; | |
} | |
return img; | |
} |
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
#!/usr/bin/env ruby | |
# status_board_list_accounts.rb | |
# Hilton Lipschitz | |
# Twitter/ADN: @hiltmon | |
# Web: http://www.hiltmon.com | |
# Use and modify freely, attribution appreciated | |
# | |
# Script to list Google Analytics accounts | |
# |
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
#!/usr/bin/env ruby | |
# status_board_ga.rb | |
# Hilton Lipschitz | |
# Twitter/ADN: @hiltmon | |
# Web: http://www.hiltmon.com | |
# Use and modify freely, attribution appreciated | |
# | |
# Script to generate @panic status board files for Google Analytics web stats. | |
# |
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
// | |
// StickyHeaderLayout.h | |
// Wombat | |
// | |
// Created by Todd Laney on 1/9/13. | |
// Copyright (c) 2013 ToddLa. All rights reserved. | |
// | |
// Modified from http://blog.radi.ws/post/32905838158/sticky-headers-for-uicollectionview-using THANKS! | |
// |
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
To remove a submodule you need to: | |
Delete the relevant line from the .gitmodules file. | |
Delete the relevant section from .git/config. | |
Run git rm --cached path_to_submodule (no trailing slash). | |
Commit and delete the now untracked submodule files. |
NewerOlder