⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
Handlebars.template = function(templateString) { | |
return function () { | |
if (arguments.length < 1) { | |
// With no arguments, return the raw template -- useful for rendering | |
// partials. | |
return templateString; | |
} else { | |
Handlebars.templates = Handlebars.templates || {} | |
Handlebars.templates[templateString] = Handlebars.templates[templateString] || Handlebars.compile(templateString); | |
return Handlebars.templates[templateString](arguments[0], arguments[1]); |
Hackintosh Build October 2011 | |
Component list: | |
ASUS P8P67 PRO (REV 3.0) LGA 1155 | |
http://www.newegg.com/Product/Product.aspx?Item=N82E16813131703 | |
Intel Core i7-2600K | |
http://www.newegg.com/Product/Product.aspx?Item=N82E16819115070 |
#Four Ways To Do Pub/Sub With jQuery and jQuery UI (in the future)
Between jQuery 1.7 and some of work going into future versions of jQuery UI, there are a ton of hot new ways for you to get your publish/subscribe on. Here are just four of them, three of which are new.
(PS: If you're unfamiliar with pub/sub, read the guide to it that Julian Aubourg and I wrote here http://msdn.microsoft.com/en-us/scriptjunkie/hh201955.aspx)
##Option 1: Using jQuery 1.7's $.Callbacks() feature:
# | |
# Some helper methods | |
# | |
app = | |
activePage: -> | |
$(".ui-page-active") | |
reapplyStyles: (el) -> |
require "json" | |
require "rake-pipeline-web-filters" | |
input "assets" | |
output "public" | |
class HandlebarsFilter < Rake::Pipeline::Filter | |
def initialize(&block) | |
block ||= proc { |input| input.sub(/\.handlebars$/, '.js') } | |
super(&block) |
App.collectionController = Em.ArrayProxy.create(Ember.PaginationSupport, { | |
content: [], | |
fullContent: App.store.findAll(App.Job), | |
totalBinding: 'fullContent.length', | |
didRequestRange: function(rangeStart, rangeStop) { | |
var content = this.get('fullContent').slice(rangeStart, rangeStop); | |
this.replace(0, this.get('length'), content); | |
} | |
}); |
{"api_response":{"tags":"","groupPointAward":"0","fullUrl":"http://newsit.net/assets/badges/multitasker.png","dateIssued":"1327945543","pointAward":"0","serviceType":"1","endTime":"0","rules":{"Rule":{"actionTag":"Video_Watch","achieved":"0","sortOrder":"1","serviceActionType":"none","type":"count","serviceType":"nitro","operator":"GE","goal":"1","completed":"false"}},"ruleMatchType":"0","startTime":"1327945543","completionCount":"0","hideUntilEarned":"0","name":"Be a Multitasker Workaround Test","repeatable":"0","folderName":"Participation","groupFlag":"0","applyMultiplier":"0","pointCategory":"Points","dailyAchievementLimit":"0"}} |