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
response.setHeader('Location', url); | |
response.setHeader('Content-Length', body.length); | |
response.setHeader('Content-Type', 'text/html'); | |
response.statusCode = 302; | |
response.end(body); |
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
response.setHeader('Location', url); | |
response.setHeader('Content-Length', body.length); | |
response.setHeader('Content-Type', 'text/html'); | |
response.statusCode = 302; | |
response.end(body); |
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
<% if(!everyauth.loggedIn) { %> | |
<h2>Not Authenticated</h2> | |
<a href="/auth/twitter">Who am i with twitter</a> | |
<% } else {%> | |
<h3>Twitter User Data</h3> | |
<p> | |
<%= JSON.stringify(everyauth.twitter.user) %> | |
</p> | |
<% } %> |
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
<% if(!everyauth.loggedIn) { %> | |
<h2>Not Authenticated</h2> | |
<a href="/auth/twitter">Who am i with twitter</a> | |
<% } else {%> | |
<h3>Twitter User Data</h3> | |
<p> | |
<img src="<%= everyauth.twitter.user.profile_image_url %>"/> | |
<h2>Welcome <%= everyauth.twitter.user.name %></h2> | |
</p> | |
<% } %> |
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
<!-- mon formulaire de saisie --> | |
<div id="snippet-form"> | |
<h2>Go ...</h2> | |
<form action="/" class="well"> | |
<label>Title : </label> | |
<input id="title" type="text" class="span3" style="width:100%" placeholder="title"/> | |
<label>Code Snippet : (with markdown) </label> | |
<textarea id="code" placeholder="code" style="width:100%" rows="5"></textarea> | |
<!-- on ajoute un compteur --> |
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
# /bin/sh | |
#chmod a+x lazy.coder.sh | |
#parameter : application name : ./lazy.coder.sh <application_name> | |
#Libs | |
#Gimme names | |
LIB1=jquery | |
LIB2=underscore.js | |
LIB3=backbone.js |
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
import java.io.IOException; | |
import java.io.StringWriter; | |
import java.io.Writer; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.Map; | |
import org.codehaus.jackson.JsonGenerationException; | |
import org.codehaus.jackson.map.JsonMappingException; | |
import org.codehaus.jackson.map.ObjectMapper; |
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
import org.k33g.bb.BBModel; | |
import java.util.ArrayList; | |
import java.util.Map; | |
import static org.k33g.bb.BBMap.$; | |
import static org.k33g.bb.BBMap.Attributes; | |
class Human extends BBModel { |
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
module.exports = mystack_cmd; | |
var fs = require('fs') | |
, path = require('path') | |
, exec = require('child_process').exec; | |
mystack_cmd.usage = "gimme mystack <appname>"; | |
mystack_cmd.description = ['my personnal express.js boilerplate', "@k33g_org"]; |
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
// Just do this : (and include backbone.js) | |
var Kind = function() { | |
this.initialize && this.initialize.apply(this, arguments); | |
}; | |
Kind.extend = Backbone.Model.extend | |
//Simpler | |
var Thing = function() {}; | |
Thing.extend = Backbone.Model.extend |