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
App.NewsObject = Em.Object.extend({ | |
id: 0, | |
title: "Title", | |
shortDescription: "shortDesc", | |
longDescription: "longDesc", | |
image: "image", | |
content: "article content", | |
date: "1970-01-01", | |
url : "" | |
}); |
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
<script type="text/x-handlebars" data-template-name="home-top-news"> | |
<!-- The main element + the other 3 --> | |
{{#each content}} | |
<div style="float:left;display:inline-block;margin-left:15px;margin-bottom:15px;"> | |
<img {{bindAttr src="image"}} id="img-{{unbound id}}" /> | |
<h2 id="h2-{{unbound id}}">{{title}}</h2> | |
<h3><a href="#" id="id-{{unbound id}}">{{shortDescription}}</a></h3> | |
</div> | |
{{/each}} | |
</script> |
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
App.homeTopNewsController = Ember.ArrayController.create({ | |
content: [], | |
load: function() { | |
}, | |
// Callback from SOAP callee | |
parse: function(data) { | |
}, | |
// Returns 1st element for Top News |
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
<div id="ember475" class="ember-view slider" style="position: relative; overflow: hidden; cursor: -webkit-grab; -webkit-perspective: 1000px; -webkit-backface-visibility: hidden; width: 2650px; -webkit-transform: matrix(1, 0, 0, 1, 0, 0); "> | |
<!-- The main element + the other 3 --> | |
<script id="metamorph-19-start" type="text/x-placeholder" style="width: 0px; float: left; "></script><script id="metamorph-20-start" type="text/x-placeholder" style="width: 0px; float: left; "></script> | |
<div class="draggable post slide21" id="post21" style="width: 235px; float: left; "> | |
<cat style="display:none;"><script id="metamorph-30-start" type="text/x-placeholder"></script><script id="metamorph-30-end" type="text/x-placeholder"></script></cat> | |
<img id="img-21" src="apple-touch-icon-114x114-precomposed.png" name="Title21" onclick="javascript:openHash('#id-21')"> | |
<p><a href="#id-21" onclick="javascript:alert('#id-21')" style="z-index:1000;">Title21</a></p> | |
<h3><a 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
/** | |
* jQuery Plugin to get cursor position | |
*/ | |
(function ($) { | |
$.fn.getCursorPosition = function () { | |
var input = this.get(0); | |
if (!input) return; // No (input) element found | |
if ('selectionStart' in input) { | |
// Standard-compliant browsers | |
return input.selectionStart; |
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
Show hidden characters
[ | |
{ "keys": ["ctrl+shift+t"], "command": "open_terminal_project_folder" }, | |
{ "keys": ["ctrl+tab"], "command": "next_view" }, | |
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" } | |
] |
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 baseUrl = 'https://api.parse.com/1', | |
appId = 'XXXXXXXXXXXXXXX', | |
apiKey = 'XXXXXXXXXXXXXX'; // make sure to use the REST API Key | |
var _register = function(params, lambda, lambdaerror) { | |
var method = 'POST', | |
url = baseUrl + '/installations', | |
payload = (params) ? JSON.stringify(params) : ''; | |
_helper(url, method, payload, function(data, status) { |
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
m = function () { | |
emit(this.ID, 1); | |
} | |
r = function (k, vals) { | |
return Array.sum(vals); | |
} | |
db.Vehicle.mapReduce(m, r, {out: {inline: 1}, query: {value: {$gt: 1}}}) |
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
^\s+\{\s+"field1" : "([^"]+)",\s+"field2" : "([^,]+)",\s+"field3" : "([^"]+)",\s+"field4" : "([^"]+)",\s+"field5" : (\d+)\s+\},?\s? |
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
/* | |
fileExistSync - Check if a file exist in NodeJS | |
Twitter: @FGRibreau / fgribreau.com | |
Usage: | |
var fileExistSync = require('./fileExistSync'); | |
var exist = fileExistSync('/var/folders/zm/jmjb49l172g6g/T/65b199'); | |
Support for Nodev0.6 |
OlderNewer