Skip to content

Instantly share code, notes, and snippets.

MODEL COFFEE FILE image.coffee :
window.models = {} unless window.models?
JSV = require("./jsv").JSV
jsvEnv = JSV.createEnvironment()
imageSchema =
"type":"object"
// Schema:
{
"type":"object",
"id":"#telemetry",
"properties":{
"t": { "type":"number", "optional":true }, // optional because of enter event
"type": {
"type": "string",
"enum":["basic", "enter", "go", "response", "submit", "exit"]
},
-------------------- native-conduit.coffee -------------------------
define ['backbone', 'underscore'], (Backbone, _) ->
return _(Backbone.Events).clone()
---------------------- addition to main.coffee ---------------------
define [...'app/native-conduit'...], (...nativeConduit...) ->
...
window.DRC_jsClient = nativeConduit.trigger
...
class views.GraphToggleMenu
# note this template is pseudocode and will not work inline like this
template: """
<div class="selected-option"></div>
<div class="dropdown-arrow"></div>
<ul class="graph-menu"></ul>
"""
initialize: (options) ->
# if model is not manually set (probably doesn't need to be) then
SELECT
u.id AS user_id,
c.id AS led_campaign_id,
pc.id AS personal_campaign_id,
c2.id AS personal_campaign_campaign_id,
c3.id AS followed_campaign_id
FROM users u
LEFT OUTER JOIN campaigns c ON u.id = c.creator_id
LEFT OUTER JOIN photos p ON c.photo_id = p.id
@akb
akb / keybase.md
Created September 26, 2017 22:11

Keybase proof

I hereby claim:

  • I am akb on github.
  • I am akb23 (https://keybase.io/akb23) on keybase.
  • I have a public key ASDqnhq_0VeHlWdpZc4p4fMlUy2aVe07oT-9TYhLqfyPRQo

To claim this, I am signing this object: