I hereby claim:
- I am kineticac on github.
- I am artchang (https://keybase.io/artchang) on keybase.
- I have a public key ASDwl6uPvgFTVkxhjbV-3eXNz6FqmAoPbg1K8YwmmQThAQo
To claim this, I am signing this object:
do shell script "ssh username@IPaddress '~/Dropbox/code/target-display/targetdisplay.sh'" |
I hereby claim:
To claim this, I am signing this object:
// Assume these return images from disk purely as CI and CG images | |
let ciImage = createPureCIImage() | |
let cgImage = createPureCGImage() | |
// This fetches the imageView reference | |
let imageView = getUIImageView() | |
imageView.contentMode = .ScaleAspectFit | |
// this will not show aspect fit | |
imageView.image = UIImage(CIImage: ciImage) |
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { | |
let branch = Branch.getInstance() | |
branch.initSessionWithLaunchOptions(launchOptions, andRegisterDeepLinkHandler: { params, error in | |
if (error != nil) { | |
TrackingManager.track(eventName: "Branch failed", withProperties: ["errorMsg": error.localizedDescription, "code": "\(error.code)"], timed: false) | |
} | |
} | |
} | |
} |
def some_view | |
@majors = HobsonsMajor.where(id: [@athlete.major1, @athlete.major2, @athlete.major3]) | |
end |
belongs_to :athlete | |
# before we create this new bookmark, we did not need to query SQL for athlete, now we do because of this new mixpanel. | |
# Let's assume a query lookup on athlete is 100ms. So now we have 110ms, which is more than 10x the response time. | |
def before_create | |
Mixpanel.track('some_event', {distinct_id: athlete.r_email}) | |
end |
def row_divider | |
(render partial: 'shared/row_divider').html_safe | |
end |
ids = [111, 22, 332, 34, 445] | |
athletes = Athlete.where(:id => ids).index_by(&:id) | |
unless athletes.empty? | |
athletes = ids.map{|id| athletes[id]} | |
athletes.compact! | |
end |
ZREMRANGEBYRANK key 0 -100 |
class Athlete < ActiveRecord::Base | |
include Extensions::AthleteSearch | |
# rest of athlete model code | |
end |