In Molokoloco | 23 Mar 2012 | Laisser un commentaire
Exploring the web i found this little experiment by @felixturner
It use the audio API and Three.js, for a real time 3D sound visualization
My remake is here : http://www.b2bweb.fr/bonus/Braincer/
In Molokoloco,Shared Items | 7 Jan 2012
CasperJS is an open source navigation scripting & testing utility based on PhantomJS, the scriptable headless WebKit engine. It eases the process of defining a full navigation scenario and provides useful high-level functions, methods & syntactic sugar for doing common tasks such as:
In the following example, we’ll query google for two terms consecutively, “capserjs” and “phantomjs”, aggregate the result links in a standard Array and output the result to the console.
Fire up your favorite editor and save the javascript code below in a googlelinks.js file:
In the following example, we’ll query google for two terms consecutively, “capserjs” and “phantomjs”, aggregate the result links in a standard Array and output the result to the console.
Fire up your favorite editor and save the javascript code below in a googlelinks.js file :
var links = []; var casper = new phantom.Casper(); function getLinks() { var links = document.querySelectorAll('h3.r a'); return Array.prototype.map.call(links, function(e) { return e.getAttribute('href') }); } casper.start('http://google.fr/', function(self) { // search for 'casperjs' from google form self.fill('form[name=f]', { q: 'casperjs' }, true); }); casper.then(function(self) { // aggregate results for the 'casperjs' search links = self.evaluate(getLinks); // now search for 'phantomjs' by fillin the form again self.fill('form[name=f]', { q: 'phantomjs' }, true); }); casper.then(function(self) { // aggregate results for the 'phantomjs' search links = links.concat(self.evaluate(getLinks)); }); casper.run(function(self) { // echo results in some pretty fashion self.echo(links.length + ' links found:'); self.echo(' - ' + links.join('\n - ')).exit(); });
In Molokoloco,Shared Items | 7 Jan 2012
@floriancargoet (whom i meet at @ParisJS) come with a nice idea : automating some elements screenshot in a WebApps/WebPages powered with #PhantomJS (headless WebKit with JavaScript API). He’s idea is to generate multilingual documentation for a complexe application (Ext JS / Sencha).
In his example, the use of Ext.js give some constrain finding the element offset in the page…
/* * page.evaluate() is sandboxed * so that 'component' is not defined. * * It should be possible to pass variables in phantomjs 1.5 * but for now, workaround! */ eval('function workaround(){ window.componentSelector = "' + component.selector + '";}') page.evaluate(workaround); var rect = page.evaluate(function(){ // find the component var comp = Ext.ComponentQuery.query(window.componentSelector)[0]; // get its bounding box var box = comp.el.getBox(); // box is {x, y, width, height} // we want {top, left, width, height} box.top = box.y; box.left = box.x; return box; }); page.clipRect = rect; page.render(component.output);
But with jQuery it could be as simple as this…
page.clipRect = $('ul#menu').offset(); page.render(component.output);
See the blog post for more infos
In Molokoloco | 3 Jan 2012 | Laisser un commentaire
In Molokoloco | 2 Jan 2012 | Laisser un commentaire
Musique maestro !
Le petit son qui va bien…
John Lord Fonda Mix November 2010 by JohnLordFonda
…et la playlist qui cogne :) #happy#new #year
In Coding Projects,Molokoloco | 13 Dec 2011 | Laisser un commentaire
Il y a quelque temps, J’ai vu passer un plugin très intéressant nommé “Beeline“.
Son but et d’aider à lire plus rapidement en accompagnant l’oeil, grâce a un dégradé sur le texte qui évite de se perdre en fin de ligne.
Oui c’est mal de copier ! -mais je suis contre les brevets sur les logiciels- ;)
J’ai implémenté une première version (alpha !) avec mon ami jQuery.
Voici la démo en live sur JSfiddle. J’espère faire un test rapidement pour l’intégrer dans mon lecteur de livre…
jQuery $.textGradient() ReadR V0.2 – remix by @molokoloco 2011
“Save Time. Save Your Eyes. Read With BeeLine.”
Original idea from http://beelinereader.com
Use “jQuery.xColor.js” plugin for funny colors !
http://www.xarg.org/project/jquery-color-plugin-xcolor/
In Molokoloco | 7 Dec 2011 | Laisser un commentaire
Merci à @bobylito qui vient de mettre les vidéos (du live) en ligne sur Dailymotion.
On trouve entre autre ma présentation sur readr.js . Mais aussi plein de super autres sujets (http://www.dailymotion.com/ParisJS #ParisJS)
Ça fait drôle de se voir en vidéo, et ça fait drôle de parler devant beaucoup de gens avec plein de lumière dans les yeux :)
In Coding Projects,Molokoloco | 1 Dec 2011 | Laisser un commentaire
“My Book ReadR” La présentation que j’ai faite hier soir à la conférence #ParisJS 13 (parisjs.org).
In Coding Projects,Molokoloco | 23 Oct 2011 | Laisser un commentaire
[UPDATE : Projet en cours de refonte ici : https://github.com/molokoloco/jQuery.boxFx]
J’ai voulu tester ce que pouvais donner un émetteur de particule en DOM jQuery/CSS (Sans canvas)…
C’est un plugin léger et hyper-customisable, son principe et de (re)générer, X fois par secondes, un élément HTML, de lui appliquer des propriétés CSS3 (de départ), de l’insérer dans le DOM.
Le plugin applique quasi immédiatement les propriétés CSS de fin, et, au bout d’un certain temps, recycle l’élément : L’animation n’est pas faite avec jQuery $.animate() mais grâce aux propriétés CSS3 de transition, afin de bénéficier de l’accélération matériel (GPU)
En arrière plan, le plugin contient quelques méthodes qui permettent aux propriétés “cssFrom” et “cssTo” de supporter automatiquement l’ajout du “browser prefix” :
$.fn.crossCss = function(css) { return this.each(function() { var $this = $(this); if (typeof css != 'object') return $this; for (var p in css) if (Modernizr.prefixed(p)) css[Modernizr.prefixed(p)] = css[p]; return $this.css(css); }); };
Support cross-browser : Transition, borderRadius, borderImage, maskImage, Transform, boxShadow, etc
Le plugin écoute (bind) plusieurs événement via des méthodes publiques : start, stop, update, …
Exemple d’utilisation :
// Permet de mettre à jour, depuis n'importe quelle fonction, une ou des propriétés de l'émetteur $emitter1.trigger('update', [{emitterRadius:16, rate:0}]);
Il envois (trigger) un évènement à chaque emission de particule (Cf. source) :
// Ecouter si un nouveau sprite à été émis $emitter1.bind('emit', function(e, $sprite) { $sprite.html('Ok'); // On modifie en live le contenu });
Si la valeur “options.rate” est mise à Zéro, le plugin utilise la fonction “requestAnimationFrame()”, à la place de “setTimeout()”, afin de maximiser les performance.
Pour le moment il fait des bulles dans l’espace… mais on peu tout imaginer, des tweets, une cascade verticale, des images, beaucoup beaucoup de possibilités… de la synchro audio/vidéo,… Par exemple tapez une lettre entre les deux balises “<div></div>”
C’est pour cela que le code est ouvert sur Github ! :)
J’ai fais ce que j’ai pu pour chasser les bugs, mais il doit bien en rester ^^, vos commentaires sont les bienvenus…
PS : Cette ancienne démo est rigolote aussi :
http://jsfiddle.net/molokoloco/wRS8A/
In Molokoloco | 18 Oct 2011 | Laisser un commentaire
We often see the “Promote JS” logo on the web, but for JavaScript, all the logos are branded, like with jQuery or Mozilla. Even if this both examples are cool foundation or team, there is no equivalent to the HTML5 logo, witch is agnostic (and as an universal identity).
Nerver know what’s the next needs for your app… now you got that too ;)
And i throw the idea in the air, if whom want to take the project to another level…
JS logo “Square” version
16×16
32×32
64×64
128×128
256×256
JS logo “Badge” version
Here you can download the ZIP with all ressources, images, PSD, SVG…
You can also take the project online
- http://jsfiddle.net/molokoloco/Xh9P8/ (JS logo “badge” SVG V0.1)
- http://jsfiddle.net/molokoloco/4yGUw/ (JS logo(s) “square” CSS3 V0.1)
- Nb : Fonts seems to be best anti-aliased in Firefox
This JavaScript logo is licensed under Creative Commons Attribution 3.0
Hi, i'm Julien Guézennec, a (not so) young French Internet conceptor and developer with the nickname of "molokoloco".
This site is mostly my memory on the evolving WWW (RSS Mashup), but also a place to share about coding, JavaScript, freedom, friends, politics and geekness pleasure...
MyBookReadR | The RSS Wall | Carousel slider | Fast web start | Try it :)
My latest sources and sheets :
Github sources | Personnal wikis | jsFiddle examples | WebDev bookmarks