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
reloadRecords: function() { | |
SC.Request.getUrl('/yoururl').json() | |
.notify(this, '_didRetrieve') | |
.send(); | |
}, | |
_didRetrieve:function(response) { | |
if(!SC.ok(response)) { | |
console.log('Unable to retrieve record'); |
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.get('/templates/foo.handlebars', function(data) { | |
var template = SC.Handlebars.compile(data); | |
SC.TEMPLATES['foo'] = template; | |
}) |
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
// | |
// A very simple Node.js static file server and Ajax proxy, based on lightnode (https://github.com/ngspinners/lightnode) | |
// | |
// Requirements: | |
// Node.js | |
// npm for the installation of modules | |
// lightnode (installed via npm) | |
// | |
// How to use, with all dependencies in place: | |
// node nodeserver.js [/path/to/the/root/folder] |
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
//Adds $.xhr and jQuery-like $.ajax methods to the prescribed namespace. | |
//Inspired from David Flanagans excellent cross-platform utils http://www.davidflanagan.com/javascript5/display.php?n=20-1&f=20/01.js | |
//Includes underscore.js _.each and _.extend methods | |
//modified to behave like jQuery's $.ajax(), not complete. | |
(function($) { | |
var win=window, xhrs = [ | |
function () { return new XMLHttpRequest(); }, | |
function () { return new ActiveXObject("Microsoft.XMLHTTP"); }, | |
function () { return new ActiveXObject("MSXML2.XMLHTTP.3.0"); }, | |
function () { return new ActiveXObject("MSXML2.XMLHTTP"); } |
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
// | |
// A very simple Node.js static file server and Ajax proxy, based on lightnode (https://github.com/ngspinners/lightnode) | |
// | |
// How to use: | |
// node nodeserver.js [/path/to/the/root/folder] | |
// | |
// Go to a URL such as http://localhost:8080/somefile.html where somefile.html exists in the current folder | |
// where node was started, or in the folder provided as a parameter | |
// | |
// For proxy requests, use http://localhost:8080/proxy/http://www.yourserver.com/ajaxCall to proxy your Ajax |
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
Luh.Ui.SwipeView = Ember.ContainerView.extend({ | |
width: null, | |
height: null, | |
content: null, | |
duration: '1s', | |
swipeOptions: { |
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
.swipe_item { | |
position: absolute; | |
-webkit-transform: translateZ(0); | |
top: 0px; | |
height: 100%; | |
width: 100%; | |
} | |
.swipe_slider { | |
position: relative; |
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
require 'execjs' | |
class HandlebarsFilter < Filter | |
class << self | |
def contents | |
@@contents ||= [File.read("headless-ember.js"), File.read("ember.js")].join("\n") | |
end | |
def context | |
@@context ||= ExecJS.compile(contents) |
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 fs = require('fs') | |
var vm = require('vm') | |
var handlebarsjs = fs.readFileSync('path/to/handlebars.js', 'utf8') | |
var emberjs = fs.readFileSync('path/to/ember.js', 'utf8') | |
var templatesDir = 'path/to/template/dir' | |
desc('Compile all .handlebars templates') | |
task({ 'handlebars': [] }, function () { | |
process.stdout.write('Compiling .handlebars templates') |
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
-- ======================================== | |
-- Author: Christopher Webb | |
-- Web: http://conspirator.co | |
-- Twitter: http://twitter.com/conspirator | |
-- ======================================== | |
set finderPath to "" | |
tell application "Finder" | |
try |
OlderNewer