Skip to content

Instantly share code, notes, and snippets.

View sebby's full-sized avatar
🏠
Working from home

Sébastien Cunin sebby

🏠
Working from home
View GitHub Profile
@sebby
sebby / gist:9155786
Last active August 29, 2015 13:56
#javascript #async exemple d'une utilisation de async.parallel
var fct_one = function (callback){
callback(null,Math.random()*10000);
};
async.parallel({
one: fct_one,
two: function(callback){
callback(null,2);
},
three:fct_one
@sebby
sebby / example_async
Last active August 29, 2015 13:55
Exemple d'utilisation de la lib Async (browser)
async.parallel([
function(callback){
setTimeout(function(){
console.log('flag1');
callback(null,{"flag1":new Date()});
}, 2000);
},
function(callback){
setTimeout(function(){
console.log('flag2');
# 1ere règle
tell application "Adium"
go away with message "Podomoro en cours | back at " & (time string of ((current date) + 25 * minutes))
end tell
# 2eme règle
tell application "Adium"
go available
end tell
<?php
// Utilisable dans le CMS Drupal
$wrapper = entity_metadata_wrapper('node', $node);
dsm($wrapper->book->author->mail->value());
dsm($wrapper->book->title->value());
dsm($wrapper->book->label(),'Titre de book');
dsm($wrapper->label(),'Titre du noeud');