This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(['lodash'], function (_) { | |
'use strict'; | |
var defaultValidators = { | |
$required: { | |
name: '$required', | |
attribute: 'ng-required', | |
cleanName: 'required', | |
validate: function (value) { | |
return !!value; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package realbase | |
import ( | |
// "fmt" | |
// "gopkg.in/igm/sockjs-go.v2/sockjs" | |
// "net/http" | |
"gopkg.in/mgo.v2/bson" | |
) | |
func constructMessage(doc bson.M, operation string) bson.M { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"github.com/ChimeraCoder/anaconda" | |
"net/url" | |
"fmt" | |
) | |
func main() { | |
anaconda.SetConsumerKey("54EgkqrPnKv8pVaKUhJhqmu3z") | |
anaconda.SetConsumerSecret("r2wBT4GzKyqkPU4kcYY9n3Omw0GnQHEGEFqN86dXLAnhkVuZEO") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async search(substring) { | |
const url = `${SEARCH_URL}${encodeURIComponent(substring)}`; | |
const response = await fetch(url); | |
const $ = cheerio.load(await response.text()); | |
const videoElements = $(VIDEO_CLASS); | |
const getIdSelector = id => `${VIDEO_CLASS}[data-context-item-id=${id}]`; | |
return Array.from(videoElements).map((videoEl) => { | |
const id = videoEl.attribs['data-context-item-id']; | |
const idSelector = getIdSelector(id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Post = Parse.Object.extend('Post'); | |
var myComment = new Comment(); | |
myComment.set('content', 'Let\'s do Sushirrito.'); | |
myComment.set('post', new Post()); | |
myComment.save(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var GameScore = Parse.Object.extend('GameScore'); | |
var gameScore = new GameScore(); | |
gameScore.set('score', 1337); | |
//Create | |
gameScore.save().then(...); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gameScore = everlive.data('GameScore'); | |
//Create | |
gameScore.create({ score : 1337 }).then(...); | |
//Read | |
gameScore.getById('item-id').then(...); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var query = new Everlive.Query(); | |
query.expand({ | |
Post: { | |
TargetTypeName : 'Post' | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
everlive.push.notifications.create({ | |
Filter: { | |
'Parameters.City': 'Tokyo' | |
}, | |
Message: 'The Giants won against the Mets 2-3.' | |
}).then(...); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Parse.Push.send({ | |
channels: [ 'Tokyo' ], | |
data: { | |
alert: 'The Giants won against the Mets 2-3.' | |
} | |
}).then(...); | |
OlderNewer