Skip to content

Instantly share code, notes, and snippets.

View mwhuss's full-sized avatar

Marshall Huss mwhuss

View GitHub Profile
func makeADictionary() -> NSDictionary {
return NSDictionary("Sam", forKey: "name")
}
var user: Dictionary = makeADictionary()
user: Dictionary<NSObject, AnyObject> = {
[0] = {
key = @"name"
value = "Sam"
}
func add(a: Int, b: Int) -> Int {
return a + b
}
add(1, 2)
func add(a: Int, #b: Int) -> Int {
return a + b
}
@mwhuss
mwhuss / red_bar.md
Last active August 29, 2015 13:57
Fix the "red bar" problem on the Treehouse iPad App

Red Bar Problem

Some students who use the Treehouse iPad App are experiencing an issue where they are presented with a red bar when opening the App. This completely locks up the App and the student can't bypass it, even when rebooting their iPad or reinstalling the App.

red bar

The problem occurs when a user watches a Bonus Content video and then closes the App. If the App dies while in the background then the screen becomes locked on with the red bar. The problem exists because the App is failing to restore the previous state.

Fix

@mwhuss
mwhuss / sam.txt.asc
Created March 11, 2014 23:48
For Sam
-----BEGIN PGP MESSAGE-----
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
hQEMAy9Dj0YPf8edAQgA0c3kpPcIT8d7bg9Ac7FPcvJLAtfF8ZsZcsUy0eOMHuOC
hGFDQbAWlivaIGDLIYr9i6RntHZOW4Da+9i0zbn7ofbgLMQfOCDQQI3XsL58k9A2
1joqgpLz7R6JjEBL4c5EnU+caoEN1H85c6miROGER+0rLK9QJ156GTX2KN+eYt8h
vFhPvox7mnqv8elR3SPN5NyXxrx9GXXLQMPcmQnEND6mEspcnYk+yDH9xDGPv8aT
IjJJFxhkImigh1Tod9VRJTmWxDiQ34v8T/YKEennYls7bRiq4VABFuzC3lkne2Kx
+NAZpd7uFKJtKaceB808UWJEIU8tddA+q+Rn8/9a5dJfAehizAVaxaPDNnULOHfV
+fm6J7DgO84I1jQBzC7VWFV7Zyb1corYmi+VGmdg0sZL8uV+uZ35zahmdStCs8dK
@mwhuss
mwhuss / caleb.txt.asc
Created March 11, 2014 23:48
For Caleb
-----BEGIN PGP MESSAGE-----
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
hQEMA67Di7ThR9PFAQgAkPMoyW0t7hpSvrUD3E0kb2OVw3t6qtC1doStfSmyLj2F
PflWJ+TXqGJlVPONr79+SACf3L2YsOxAeMPOZgxZP9EXO89SS1XRBi7bMuQ03jRK
/V0UT1on/ShnyOWinTdt8/0Z03JumJUzTALoUwogUyAjCdi+w+O1vxGuXPWkJD6K
N9pbySkHW2RzIU5s2SkC6/ELYDAMcKR1K0NQIExMqBhbCMhzZxBtV+3NfmyoH6i7
uw+ujSo2GRQU1lpHXiwH+cL/Oic+2edAYK89vg13WMcbYPLV3zRG7PWiHM5HdmfY
aEOVHa87qG0uU0U16/lPQneTWa6Xhwcm0DgVx2ZMMtJfAepr9QGfdAR4njw7q3uL
IDX+DqeVSnaaSkd24PL/bDIZycDzprJI0v4yyQsErzM9UVkFaIr601xvivkk/3KS

Keybase proof

I hereby claim:

  • I am mwhuss on github.
  • I am mwhuss (https://keybase.io/mwhuss) on keybase.
  • I have a public key whose fingerprint is CD44 F91D 51D3 285B D133 E266 D65C FF2A D866 6DAC

To claim this, I am signing this object:

@interface SNDayView ()
@property (nonatomic, strong) UILabel *titleLabel;
@end
@implementation SNDayView
- (id)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];

The sun has set, the kids are in bed, and you've made yourself a hot cup of tea. Time to curl up on the couch to play that new game everyone's been talking about. You're about to get the high score and...

wall

The App crashes.

Nothing ruins an App experience like a crash; abruptly leaving users staring at their home screen. As a mobile developer, crashes are just a fact of life. Sometimes they aren't even your fault and exist in a 3rd party library or the iOS framework, but the user doesn't really care. When a crash happens it can sometimes result in a ★☆☆☆☆ review.

bad review

@mwhuss
mwhuss / macs.md
Last active January 3, 2016 03:38
Macs for sale
"intensity" : "20,20",
"vectors" : "1,1",
"worksize" : "256,256",
"kernel" : "scrypt,scrypt",
"lookup-gap" : "2,2",
"thread-concurrency" : "24000,24000",
"shaders" : "0,0",
"gpu-engine" : "0-1085,0-1085",
"gpu-fan" : "0-100,0-100",
"gpu-memclock" : "1375,1375",