This file contains hidden or 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
/* It calls the content helper, and then load the Template matching the route : | |
for exemple, /user/list will load the template "user_list" | |
It's not optimum but it works | |
*/ | |
<template name="container"> | |
<div class="container"> | |
{{#content}} | |
{{/content}} | |
</div> | |
</template> |
This file contains hidden or 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
Meteor.call('login', name, pass, function(error, user){ | |
if ( error ) { | |
Session.set('message', error.error + ': ' + error.reason); | |
} else { | |
Session.set('message', 'You are now connected, ' + user.name + '.'); | |
Session.set('user', user); | |
} | |
MyApp.navigate('/user/list'); | |
}); |
This file contains hidden or 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
node.js:201 | |
throw e; // process.nextTick error, or 'error' event on first tick | |
^ | |
ReferenceError: require is not defined | |
at app/node_modules/twitter-node/lib/twitter-node/index.js:1:20 | |
at /Users/Diacred/Work/Meteor/penis/little-test-projet-meteor/.meteor/local/build/server/server.js:111:21 | |
at Array.forEach (native) | |
at Function.<anonymous> (/Users/Diacred/Work/Meteor/penis/little-test-projet-meteor/.meteor/local/build/server/underscore.js:76:11) | |
at /Users/Diacred/Work/Meteor/penis/little-test-projet-meteor/.meteor/local/build/server/server.js:97:7 | |
Exited with code: 1 |
This file contains hidden or 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 Tree = Base.extend({ | |
constructor: function(tree) { | |
this.tree = tree; | |
this.count = this.count_nodes(0); | |
}, | |
delete: function(node_id, tree){ | |
var that = this; | |
if ( tree === undefined ) tree = that.tree; | |
_.each(tree, function(node, i){ |
This file contains hidden or 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
<template name="editor"> | |
<div class="well {{#if editor_mode}}editor-show{{/if}}" id="editor"> | |
<textarea id="editor-area" placeholder="Enter your text ...">{{get_file}}</textarea> | |
</div> | |
</template> |
This file contains hidden or 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
# So we have something like this : | |
class User | |
class << self | |
def find_by_sql(sql) | |
rows = @@connector.execute(sql) | |
# => [[1, 'Marc']] | |
rows.map do |row| | |
attributes = match_columns_to_values(row) |
This file contains hidden or 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
module ApplicationHelper | |
# Public: display an inline user authentication interaction | |
# | |
# Returns the generated html String. | |
def display_user_authentication | |
if user_signed_in? | |
render 'devise/menu/logout_button' | |
else | |
render 'devise/menu/login_form' | |
end |
This file contains hidden or 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 ga = new GA(); | |
ga.processGeneration(); | |
ga.mateNextGeneration(); | |
function GA() { | |
this.generation = [ | |
"Gekmo+ xosmd!", | |
"Gekln, worle'", | |
"Fello, wosld!", | |
"Gello, wprld!", |
This file contains hidden or 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
[Books] | |
The story of computing : http://www.amazon.com/Engineers-Scientists-Iconoclasts---Programmers-Revolution/dp/0465042260/ref=sr_1_1?s=books&ie=UTF8&qid=1324406043&sr=1-1 | |
OlderNewer