- Pour 6 gua bao
- ✎ 300 g de farine de blé T65 ( ou T55 )
- ✎ 150 ml d’eau tiède
- ✎ 15 g de sucre de canne
- ✎ 5 g de levure sèche instantanée du boulanger
- ✎ 1 pincée de sel
- ✎ 1 càs d’huile d’olive
- Tofu à la citronnelle
- ✎ 2 tiges de citronnelle
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
_.reduce(o, function red(memo, val, key){ | |
if(typeof val === 'object'){ | |
_.reduce(val, red, memo) | |
} else { | |
memo[key] = val; | |
} | |
return memo; | |
}, Object.create(null)); |
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.exports = function(grunt) { | |
grunt.loadNpmTasks('grunt-contrib-connect'); | |
grunt.loadNpmTasks('grunt-connect-proxy'); | |
var proxySnippet = require('grunt-connect-proxy/lib/utils').proxyRequest; | |
grunt.initConfig({ | |
connect: { | |
server: { | |
options: { |
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
function diff(A,B,prop){ | |
var getProp = _.property(prop); | |
var eq = function(itemA, itemB){ | |
return getProp(itemA) === getProp(itemB); | |
}; | |
return _.filter(A, function(itemA){ | |
return ! _.some(B, _.partial(eq,itemA) ); | |
}); |
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
grunt.registerTask('echo', function(){ | |
fs.createReadStream('./package.json',{encoding:'utf-8'}) | |
.pipe( process.stdout ); | |
}); |
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 replaceMap = [ | |
{token:/pattern1/, value:"value1"}, | |
{token:/pattern2/, value:"value2"}, | |
]; | |
return replaceMap.reduce(function(memo, item){ | |
return memo.replace(item.token, item.value); | |
}, "pattern1 or patten2 will be replaced"); |
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
//Since http://devdocs.io/dom/urlutils.searchparams is not already bake! | |
//the url to parse | |
var url = "https://toto.com/truc/?param1=yo¶m2=toto&tutu=titi"; | |
// Create a HTMLAnchorElement | |
var a = document.createElement('a'); | |
// Lazy dev let the browser do the hard job and parse the url | |
a.href = url; |
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
function reactView(req, res, next) { | |
Router.run(routes, req.url, function (Handler) { | |
// Content is the route handler, | |
// which then handles all the routing | |
// and kicks back HTML with React.renderToString | |
var title = "Lumographe"; | |
if (req.url !== "/") { | |
var project = store.findByUrl(req.url); | |
if (project) { | |
title += " | " + project.name; |
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
/* | |
Find the number of complete row and col from a number of objects | |
*/ | |
col = Math.sqrt(_nbCards); | |
if (_nbCards % col > 0) | |
{ | |
while (_nbCards % ++col != 0){}; | |
} |
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
package ui.utils | |
{ | |
import flash.display.CapsStyle; | |
import flash.display.LineScaleMode; | |
import flash.display.Shape; | |
import flash.events.Event; | |
import flash.utils.clearInterval; | |
import flash.utils.getTimer; | |
import flash.utils.setInterval; | |
OlderNewer