require 'open-uri' | |
require 'nokogiri' | |
year = 2014 | |
doc = Nokogiri::HTML(open("https://developer.apple.com/videos/wwdc/#{year}/")) | |
doc.search("p.download").each do |download| | |
href = download.at("a").attr('href') | |
uri = URI(href) | |
uri.path = uri.path.split('/')[0...-1].join('/') + '/' |
struct もじれつ: Printable { | |
let description: String | |
init(string: String) { | |
var mutableString = NSMutableString(string: string) as CFMutableString | |
if CFStringTransform(mutableString, nil, kCFStringTransformLatinHiragana, 0) == 1 { | |
self.description = mutableString as NSString | |
} else { | |
self.description = string | |
} |
struct もじれつ: Printable { | |
let description: String | |
init(string: String) { | |
var mutableString = NSMutableString(string: string) as CFMutableString | |
if CFStringTransform(mutableString, nil, kCFStringTransformLatinHiragana, 0) == 1 { | |
self.description = mutableString as NSString | |
} else { | |
self.description = string | |
} |
source :rubygems | |
gem 'sinatra', '1.0' | |
gem 'oauth2' | |
gem 'json' | |
group :development do | |
gem 'shotgun' | |
end |
// clang -framework Foundation -fobjc-arc -O3 test.m | |
#import <Foundation/Foundation.h> | |
@interface Slice : NSObject | |
@property NSInteger start; | |
@property NSInteger length; | |
@end | |
@implementation Slice |
Season's Greetings, NSHipsters!
As the year winds down, and we take a moment to reflect on our experiences over the past months, one thing is clear: 2014 has been an incredible year professionally for Apple developers. So much has happened in such a short timespan, and yet it's hard to remember our relationship to Objective-C before Swift, or what APIs could have captivated our imagination as much as iOS 8 or WatchKit.
It's an NSHipster tradition to ask you, dear readers, to send in your favorite tips and tricks from the past year for publication over the New Year's holiday. This year, with the deluge of new developments—both from Cupertino and the community at large—there should be no shortage of interesting tidbits to share.
Submit your favorite piece of Swift or 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!
If you're wondering about what to post, look to
June 1, 2014 – September 15, 2014
Percentage of total visits for sessions among the top 100 pages on ASCIIwwdc.
- Vast majority of views for 2014 sessions, as might be expected
- Top 6 most-watched session all involve view controllers & Interface Builder (accounting for 1/4 of total traffic)
- "What's New in X" sessions are extremely popular
GYB_PATH="${SRCROOT}/Vendor/gyb/gyb" | |
function gyb { | |
file=$1 | |
if [ ${file: -4} == ".gyb" ]; then | |
"${GYB_PATH}" --line-directive '' -o "${file%.gyb}" "$file"; | |
fi | |
} | |
if [ $SCRIPT_INPUT_FILE_COUNT -ne 0 ]; then |
alfred://customsearch/Search%20WWDC%20Sessions/wwdc/utf8/noplus/http://asciiwwdc.com/search?q={query} |