A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$
if your browser aliases it:
~ 108 byte version
// by @itskathuria | |
NSURL *url = [NSURL URLWithString:@"http://hooks.events/hooks/post.php"]; | |
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; | |
[request setHTTPMethod:@"POST"]; | |
[request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"]; | |
NSString *apiKey = @"yourAPIKeyShouldGoHere"; | |
NSString *title = @"yourTitleShouldGoHere"; | |
NSString *message = @"yourMessageShouldGoHere"; | |
NSString *query = [NSString stringWithFormat:@"hooksTitle=%@&hooksMessage=%@&hooksApi=%@", title, message, apiKey]; |
Greetings, NSHipsters!
As we prepare to increment our NSDateComponents -year
by 1
, it's time once again for NSHipster end-of-the-year Reader Submissions! Last year, we got some mind-blowing tips and tricks. With the release of iOS 7 & Mavericks, and a year's worth of new developments in the Objective-C ecosystem, there should be a ton of new stuff to write up for this year.
Submit your favorite piece of Objective-C trivia, framework arcana, hidden Xcode feature, or anything else you think is cool, and you could have it featured in the year-end blowout article. Just comment on this gist below!
Here are a few examples of the kind of things I'd like to see:
NSStringFromSelector(@selector())
as a safer way to do KVC / KVO / NSCoding.// Just before switching jobs: | |
// Add one of these. | |
// Preferably into the same commit where you do a large merge. | |
// | |
// This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
// and then it quickly escalated into more and more evil suggestions. | |
// I've tried to capture interesting suggestions here. | |
// | |
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
Generate the list yourself:
$ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS*.sdk/System/Library/Frameworks/UIKit.framework/Headers
$ grep UI_APPEARANCE_SELECTOR ./* | \
sed 's/NS_AVAILABLE_IOS(.*)//g' | \
sed 's/NS_DEPRECATED_IOS(.*)//g' | \
sed 's/API_AVAILABLE(.*)//g' | \
sed 's/API_UNAVAILABLE(.*)//g' | \
sed 's/UI_APPEARANCE_SELECTOR//g' | \
// Property Nonatomic Strong | |
// Platform: All | |
// Completion Scopes: ClassInterfaceMethods | |
@property (nonatomic, strong) <# class_name #> *<# variable_name #>; |
// Long Polling (Recommened Technique - Creates An Open Connection To Server ∴ Fast) | |
(function poll(){ | |
$.ajax({ url: "server", success: function(data){ | |
//Update your dashboard gauge | |
salesGauge.setValue(data.value); | |
}, dataType: "json", complete: poll, timeout: 30000 }); | |
})(); |
iOS Support Matrix | |
Winter 2012 Edition - v2.0 | |
iPhone June 2007 | |
iPod touch Sept 2007, Feb 2008 (32GB only) | |
iPhone 3G July 2008 | |
iPod touch (2nd Generation) Sept 2008 Sept 2009 - (8GB only) | |
iPhone 3GS June 2009 | |
iPod touch (3rd Generation) Sept 2009 | |
iPad April 2010 | |
iPhone 4 June 2010 |
{ | |
"always_show_minimap_viewport": true, | |
"auto_complete_commit_on_tab": true, | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/User/SublimeLinter/Material Spacegray (SL).tmTheme", | |
"draw_minimap_border": false, | |
"enable_tab_scrolling": false, | |
"enable_telemetry": false, | |
"ensure_newline_at_eof_on_save": false, | |
"file_exclude_patterns": |