This guide is now available under this URL:
http://docs.behat.org/cookbook/bdd_in_symfony2_with_behat_mink_and_zombiejs.html
var http = require('http'); | |
var fs = require('fs'); | |
var path = require('path'); | |
var constants = require('constants'); | |
var timers = require('timers'); | |
var port = 8080; | |
http.createServer(function(req, res) { | |
if(req.url == '/') { | |
res.writeHead(200, { 'Content-Type': 'text/plain' }); |
// Here is a proposal for minimalist JavaScript classes, humbly offered. | |
// There are (at least) two different directions in which classes can be steered. | |
// If we go for a wholly new semantics and implementation, then fancier classical | |
// inheritance can be supported with parallel prototype chains for true inheritance | |
// of properties at both the class and instance level. | |
// If however, we keep current JavaScript prototype semantics, and add a form that | |
// can desugar to ES3, things must necessarily stay simpler. This is the direction | |
// I'm assuming here. |
var app = require('../app'); | |
console.log(); | |
app.routes.all().forEach(function(route){ | |
console.log(' \033[90m%s \033[36m%s\033[0m', route.method.toUpperCase(), route.path); | |
}); | |
console.log(); | |
process.exit(); |
<!-- Live demo : http://bl.ocks.org/1213727 --> | |
<html> | |
<head> | |
<title>Un affichage de numéro vert avec Microformat et mise en forme en CSS</title> | |
<link rel="stylesheet" media="all" href="numero_vert.css" type="text/css" /> | |
</head> | |
<body> | |
<span class="vcard numerovert"> | |
<span class="fn">Nom de la société</span> |
This guide is now available under this URL:
http://docs.behat.org/cookbook/bdd_in_symfony2_with_behat_mink_and_zombiejs.html
<?php | |
class sfSearchTask extends sfCommandApplicationTask | |
{ | |
/** | |
* @see sfTask | |
*/ | |
protected function configure() | |
{ | |
$this->addArguments(array( |
#!/bin/bash | |
# Requirements: sed, grep, curl, pkill | |
# User configuration | |
LOCAL_INSTALL="/usr/lib/sublime-text-2" # Must be user-writable | |
REPO="dev" # "dev" for dev releases, or "2" for beta releases | |
TARGET_BUILD="Linux 32 bit" # can be one of "Windows", "Windows 64 bit", "OS X", "Linux 32 bit", "Linux 64 bit" | |
# Check if sublime text is running |
var express = require('express') | |
, app = module.exports = express.createServer() | |
app.configure(function () { | |
app.set('views', __dirname + '/views'); | |
app.set('view engine', 'jade'); | |
app.use(app.router); | |
app.use(express.static(__dirname + '/public')); | |
}); | |
app.configure('development', function () { |
var assert = require('assert') | |
, db = require('../db')({namespace:'bookmarks-test-db'}) | |
, the_bookmark = {} | |
require('vows') | |
.describe('bookmarks-db') | |
.addBatch({ | |
"Initialize": { | |
topic: function () { | |
db.deleteAll(this.callback); |
app.get('/help', function(req, res){ | |
res.send('some help'); | |
}); | |
app.get('/search/:query/p:page', function(req, res){ | |
var query = req.params.query | |
, page = req.params.page; | |
res.send('search "' + query + '", page ' + (page || 1)); | |
}); |