A list of presenters at the Brooklyn Swift Developers Meetup with links to videos, slides and source code: http://www.meetup.com/Brooklyn-Swift-Developers
David Grandinetti - Learning Swift the Euler Way (Video) / Slides)
| class Operation: NSOperation { | |
| override var asynchronous: Bool { | |
| return true | |
| } | |
| private var _executing = false { | |
| willSet { | |
| willChangeValueForKey("isExecuting") | |
| } |
| class CustomCell: UITableViewCell, Reusable { | |
| class var reuseIdentifier: String { | |
| return "customCell" | |
| } | |
| } | |
| class SupaHotCustomCell: CustomCell { | |
| override class var reuseIdentifier: String { | |
| return "supaHotCustomCell" | |
| } |
| import UIKit | |
| enum Notifications { | |
| enum Categories: String { | |
| case Message | |
| } | |
| enum Actions: String { | |
| case RemindMeLater | |
| case Reply |
A list of presenters at the Brooklyn Swift Developers Meetup with links to videos, slides and source code: http://www.meetup.com/Brooklyn-Swift-Developers
David Grandinetti - Learning Swift the Euler Way (Video) / Slides)
| extension String { | |
| func containsUpperCaseLetter() -> Bool { | |
| let beginCodePoint = Character("A").unicodeScalarCodePoint() | |
| let endCodePoint = Character("Z").unicodeScalarCodePoint() | |
| for scalar in self.unicodeScalars { | |
| if case beginCodePoint...endCodePoint = scalar.value { | |
| return true | |
| } | |
| } |
I hereby claim:
To claim this, I am signing this object:
| clonerev() { | |
| git clone $1 | |
| cd 'sed ${1}##/*/ s/.git//' | |
| git reset --hard $2 | |
| } | |
| # Usage: clonerev [url] [commit hash] |
| $.ajax({ | |
| url: "https://api.imgur.com/3/gallery/", | |
| /* | |
| Note: It's best to avoid placing your client-id in js, as it is exposed to the end-user. | |
| To avoid this, you could proxy requests to your own server, which makes the request directly to imgur. | |
| */ | |
| headers: {"Authorization": "Client-ID YOUR_CLIENT_ID"}, | |
| success: function(data) { | |
| for(var i = 0; i < 5; i++){ | |
| console.log(data['data'][i]['link']); |
| colors = [] | |
| for i in range(0, COUNT): | |
| colors.append(colorsys.hsv_to_rgb(fmod(i * 0.618033988749895, 1.0), 0.5, 1.0)) |
| export PATH | |
| cdls() { | |
| if [ -z "$1" ]; then | |
| cd && ls -G | |
| else | |
| cd "$*" && ls -G | |
| fi | |
| } | |
| alias cd=cdls | |
| alias pearp='/Applications/MAMP/bin/php/php5.4.4/bin/pear' |