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
phantom.injectJs "casper.js" | |
getLinks = -> | |
links = document.querySelectorAll "h3.r a" | |
Array::map.call links, (e) -> e.getAttribute "href" | |
links = [] | |
casper = new phantom.Casper() | |
casper.start "http://google.fr/", (self) -> |
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 page = new WebPage(), | |
address, output, size; | |
//capture and captureSelector functions adapted from CasperJS - https://github.com/n1k0/casperjs | |
capture = function(targetFile, clipRect) { | |
var previousClipRect; | |
var clipRect = {top: 0, left:0, width: 40, height: 40}; | |
if (clipRect) { | |
if (!isType(clipRect, "object")) { | |
throw new Error("clipRect must be an Object instance."); |
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 include(url) { | |
var element; | |
switch (url.split(".").pop()) { | |
case "css": | |
{ | |
element = document.createElement("link"); | |
element.setAttribute("rel", "stylesheet"); | |
element.setAttribute("type", "text/css") | |
element.setAttribute("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 Foo() { | |
var self = this; | |
this.hello = function(fn) { | |
fn.apply(self, Array.prototype.splice.call(arguments, 1)); | |
}; | |
this.bar = function(what) { | |
console.log('ok:' + what); | |
}; | |
} |
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
def find_thread_for_proposal(self, proposal): | |
"""Finds comment thread for proposal""" | |
sql = """ | |
with recursive path as ( | |
select | |
id, | |
array[id] as path, | |
description, | |
profile_id, | |
created_at, |
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
>>> import cong | |
>>> cong.lets_get_the_party_started() |
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 casper = require("casper").create() | |
, url = casper.cli.get(0) | |
, metas = []; | |
if (!url) { | |
casper.echo('Usage: casperjs [url]').exit(); | |
} | |
casper.on('remote.message', function(msg) { | |
console.log(msg); |
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
======== ./2012020819033471175.jpeg | |
ISO : 200 | |
Aperture : 6.3 | |
Lens Model : OLYMPUS M.12-50mm F3.5-6.3 | |
Focal Length : 12.0 mm | |
Shutter Speed : 1/4000 | |
======== ./2012020819052527425.jpeg | |
ISO : 1600 | |
Aperture : 4.5 | |
Lens Model : |
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
$ casperjs event.js | |
[info] [phantom] Starting... | |
[info] [phantom] Running suite: 3 steps | |
[debug] [phantom] Successfully injected Casper client-side utilities | |
[info] [phantom] Step 2/3 file:///Users/niko/Sites/casperjs/test.html (HTTP 0) | |
[debug] [phantom] start page is loaded | |
[info] [phantom] Step 2/3: done in 207ms. | |
[info] [phantom] Step 3/3 file:///Users/niko/Sites/casperjs/test.html (HTTP 0) | |
[info] [phantom] Step 3/3: done in 310ms. | |
[info] [phantom] Done 3 steps in 406ms |
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
[13:39] <niko-> basiquement pouvoir gérer un référentiel de contenus (documents), un layout, une navigation | |
[13:39] <niko-> idalement en markdown | |
[13:39] <niko-> un truc facilement maintenable | |
[13:40] <niko-> sans serveur d'appli nécessaire, pouvoir servir le truc en statique | |
[13:40] <niko-> déploiement avec un post-commit hook sur une branche de prod | |
[13:41] <niko-> pouvoir gérer des métadonnées, bien sûr, mais avec genre de la surcharge de template hérité | |
[13:49] <niko-> ou alors je retente Hyde https://github.com/lakshmivyas/hyde | |
[13:49] <niko-> ça a l'air d'avoir pas mal évolué | |
[13:49] <niko-> limite trop, peut-être :p |