Skip to content

Instantly share code, notes, and snippets.

View ashfurrow's full-sized avatar

Ash Furrow ashfurrow

View GitHub Profile
### Keybase proof
I hereby claim:
* I am ashfurrow on github.
* I am ashfurrow (https://keybase.io/ashfurrow) on keybase.
* I have a public key whose fingerprint is 006F 20AD 6193 CAC3 2413 6FF3 DDB3 AF9C 765E 0680
To claim this, I am signing this object:
// from https://twitter.com/ashfurrow/status/482488815266045952
func foo (closure: (Array<Int> -> ()) -> ()) {
closure({ (array: Array<Int>) -> () in
for i in array {
i
}
})
}
@ashfurrow
ashfurrow / gist:b9fa03387ca8c68bc07e
Last active August 29, 2015 14:03
Crashing on Unowned reference access
@ashfurrow
ashfurrow / gist:fc6d3de4c64a7a9c88e5
Created August 15, 2014 12:37
Watch for Changes
- (void)dontshipthis:(UIView *)view
{
[[RACObserve(view, center) skip:1] subscribeNext:^(id x) {
NSLog(@"view: %@", view);
}];
for (UIView *v in view.subviews) {
[self dontshipthis:v];
}
}
@ashfurrow
ashfurrow / gist:8b896017ca8e3a2faa44
Last active August 29, 2015 14:05
Hide GitHub notification badge
// Safari -> Preferences -> Advanced -> Stylesheet
.notification-indicator .mail-status.unread {
display: none !important;
}

I don't want to get into a long, drawn out Internet argument. The fact of the matter is that what you're saying – that victims make themselves vulnerable to crime – is called victim blaming: http://en.wikipedia.org/wiki/Victim_blaming

Victim blaming comes from a psychological fallacy called the Fundamental Attribution Error. Basically, if something bad happens to me, it's due to external factors I have no control over. If it happens to someone else, then it's due to internal factors that they do have control over. This faulty reasoning allows humans to believe that bad things won't happen to them, even though they can.

Since, as a society, we cannot blame the victims of crimes perpetrated against them (to do so would be logically fallacious, see above), we instead must focus on stopping crime by focusing on those who commit it: the criminals. I'm not telling you to go around and leave your house unlocked – certainly, reduce your own risk. But if someone does get robbed, even with a locked door, don't blam

/* Conversation about: https://www.youtube.com/watch?v=4PKjF7OumYo */

Ash

I'm often puzzled by people who insist they don't "believe" in evolution. There is nothing to believe. Once you understand the biology behind DNA replication and natural selection, evolution becomes self-evident. The only wiggle-room for anti-evolutionists is the length of time over which evolution has been taking place. Some believe it's a matter of a few millennia, while the evidence tells us it's more like a matter of a billion years.

Jon

@ashfurrow
ashfurrow / gist:88cbd0b6de626706f853
Last active August 29, 2015 14:06
Swift initializer problem
class A {
let i: Int
let j: Int
init (i: Int, j: Int) {
self.i = i
self.j = j
}
convenience init(i: Int) {
@ashfurrow
ashfurrow / gist:a533a44f0ede35015881
Created September 9, 2014 16:35
CocoaPods Failure :(
> CocoaPods/bin/pod --help
Usage:
$ pod COMMAND
CocoaPods, the Objective-C library package manager.
Commands:
+ help Show help for the given command.
Ash Furrow is a Canadian iOS developer and author, currently working at Artsy. He has published four books, many apps, and is a contributor to the open source community.