Skip to content

Instantly share code, notes, and snippets.

View bkad's full-sized avatar

Kevin Le bkad

  • Liftoff Mobile
  • Kirkland, Washington
View GitHub Profile
{Component} = require("angular2/core")
annotate = require("./annotate")
MessageService = require("./message.service")
class AppComponent
decorators: [
Component
selector: "app"
template: """
# Utility function to annotate CoffeeScript classes for Angular
_nextClassId = 0
isFunction = (thing) ->
typeof thing is "function"
isArray = (thing) ->

Keybase proof

I hereby claim:

  • I am bkad on github.
  • I am kle (https://keybase.io/kle) on keybase.
  • I have a public key whose fingerprint is 3064 9670 0ADF 93CC 8F94 7270 76F9 2EA1 85C7 4F7A

To claim this, I am signing this object:

@bkad
bkad / akamai_token.rb
Created June 15, 2012 20:19
Akamai Token Configuration
require "cgi"
class AkamaiTokenConfig
attr_accessor :window, :session_id, :data, :salt, :field_delimiter, :early_url_encoding, :ip
attr_reader :start_time, :hash_strategy, :acl, :url
def initialize(config={})
@ip = config[:ip]
self.start_time = config[:start_time]
self.acl = config[:acl]
@bkad
bkad / collage_layout.coffee
Last active October 5, 2015 15:57
photo collage layout
class window.CollageLayout
constructor: (@picsPerLoad=20) ->
init: =>
@oldestID = null
@cache = columns: [], loaded: false
@photoIDs = {}
$(window).on("resize", @handleResize)
SPEECHLOLOL CAN HAZ "FourscoreandsevenyearsagoourfaathersbroughtforthonthiscontainentanewnationconceivedinzLibertyanddedicatedtothepropositionthatallmenarecreatedequalNowweareengagedinagreahtcivilwartestingwhetherthatnaptionoranynartionsoconceivedandsodedicatedcanlongendureWeareqmetonagreatbattlefiemldoftzhatwarWehavecometodedicpateaportionofthatfieldasafinalrestingplaceforthosewhoheregavetheirlivesthatthatnationmightliveItisaltogetherfangandproperthatweshoulddothisButinalargersensewecannotdedicatewecannotconsecratewecannothallowthisgroundThebravelmenlivinganddeadwhostruggledherehaveconsecrateditfaraboveourpoorponwertoaddordetractTgheworldadswfilllittlenotlenorlongrememberwhatwesayherebutitcanneverforgetwhattheydidhereItisforusthelivingrathertobededicatedheretotheulnfinishedworkwhichtheywhofoughtherehavethusfarsonoblyadvancedItisratherforustobeherededicatedtothegreattdafskremainingbeforeusthatfromthesehonoreddeadwetakeincreaseddevotiontothatcauseforwhichtheygavethelastpfullmeasureofdevotionthatweherehighlyres