Skip to content

Instantly share code, notes, and snippets.

View ashfurrow's full-sized avatar

Ash Furrow ashfurrow

View GitHub Profile
@ashfurrow
ashfurrow / stylesheet.css
Last active August 29, 2015 14:07
Custom Stylesheet
// UPDATE: Now hosted at https://github.com/AshFurrow/stylesheet
// GitHub "unread notifications" div
.notification-indicator .mail-status.unread {
display: none !important;
}
// 500px "buy this photo" BS
.buy_photo_wrap {
display: none !important;
private class InfoView: UIView {
override func intrinsicContentSize() -> CGSize {
let height = subviews.map{ $0.intrinsicContentSize().height }.reduce(0, combine: +)
return CGSize(width: UIViewNoIntrinsicMetric, height: height)
}
}
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.
@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.
@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) {

/* 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

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

@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;
}
@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];
}
}