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
$(".encrypted-content").show() | |
$(".encrypted-content").html(function(index, oldtext){ | |
new_string = "" | |
/*handle special html characters */ | |
oldtext = oldtext.replace(/>/g,">"); | |
oldtext = oldtext.replace(/</g,"<"); | |
oldtext = oldtext.replace(/&/g,"&"); | |
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 express = require('express') | |
, http = require('http'); | |
var app = express(); | |
var server = app.listen(8080, '127.0.0.1'); | |
var io = require('socket.io').listen(server); | |
app.configure(function(){ | |
app.use(express.static(__dirname + '/public')); | |
}) |
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
(function($){ | |
/* router */ | |
var AppRouter = Backbone.Router.extend({ | |
routes: { | |
"": "home", | |
} | |
}); | |
var app_router = new AppRouter; | |
app_router.on('route:home', function( 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
# This is the default .slate file. | |
# If no ~/.slate file exists this is the file that will be used. | |
#config | |
config defaultToCurrentScreen true | |
config nudgePercentOf screenSize | |
config resizePercentOf screenSize | |
#resize | |
bind right:ctrl push right bar-resize:screenSizeX/2 |
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
#when I visit /orgs/5, my route's model method isn't called with the dynamic segment. | |
Broken: | |
App.Router.map -> | |
@resource 'organizations', path: "/orgs", -> | |
@resource 'organization', path: ":id", -> | |
App.OrganizationIndexRoute = Ember.Route.extend | |
model: (params) -> | |
console.log(params) |
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
#config | |
config defaultToCurrentScreen true | |
config nudgePercentOf screenSize | |
config resizePercentOf screenSize | |
#resize | |
bind right:ctrl push right bar-resize:screenSizeX/2 | |
bind left:ctrl push left bar-resize:screenSizeX/2 | |
bind up:ctrl push up bar-resize:screenSizeY/2 | |
bind down:ctrl push down bar-resize:screenSizeY/2 |
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
when I visit /orgs/17 via a full refresh everything works as expected. | |
The page shows me some info about org 17 that is loaded from the server. | |
When I'm on the index page and I link to /org/17 using linkTo, the model isn't loaded..there's no org data on the page. | |
#index handlebars template | |
{{#linkTo organizations.show id class="org-name"}} {{name}} {{/linkTo}} | |
#router |
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(["ember"], function(Em) { | |
var Router; | |
Router = Em.Router.extend({ | |
enableLogging: true, | |
location: 'history' | |
}); | |
Router.map(function() { | |
this.route('discovery'); | |
this.resource('organizations', { |
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
#This works | |
grunt.initConfig({ | |
coffee: { | |
glob_to_multiple: { | |
options: { | |
bare: true | |
}, | |
flatten: true, | |
expand: true, | |
cwd: 'client', |
OlderNewer