Skip to content

Instantly share code, notes, and snippets.

$ git diff lib/express/plugins/body-decoder.js
diff --git a/lib/express/plugins/body-decoder.js b/lib/express/plugins/body-decoder.js
index 1d67ff4..4ec448c 100644
--- a/lib/express/plugins/body-decoder.js
+++ b/lib/express/plugins/body-decoder.js
@@ -22,7 +22,7 @@ exports.BodyDecoder = Plugin.extend({
var request = event.request
if (request.header('Content-Type') &&
request.header('Content-Type').includes('application/x-www-form-urlencoded'))
- request.params.post = queryString.parseQuery(request.body)
print 'function striptags ( code ) {
var regbr = new RegExp("<br>","gi"), regexp = new RegExp("<[^>]+>","g");
return code.replace(regbr,"\n").replace(regexp,"").replace("&nbsp;"," ");
}
function decoupe_chaine ( texte, chaine ) {
var pd,i,c,pa;
//alert("texte=\'" + texte + "\', chaine=\'" + chaine + "\'");
pd = texte.toLowerCase().indexOf(chaine.toLowerCase(),0);
<!DOCTYPE html>
<meta charset="utf-8">
<script src="http://mbostock.github.com/d3/d3.v2.js?2.8.1"></script>
<div id="viz"></div>
<div id="scale">scale: <span>240</span></div>
<script type="text/javascript">
@nkhine
nkhine / client.js
Created July 7, 2012 22:01
viewDidResize
function MyClient() {
var self = this,
width = $('#map').width(),
mapCanvasHeight = (width * 0.45);
this.init = function() {
self.drawMap();
self.drawMarker();
self.drawArc();
}
@nkhine
nkhine / demo.js
Created July 9, 2012 11:59 — forked from syntagmatic/demo.js
Projection Demo
// demo.js
//
// Adapted by Kai Chang and Rich Morin from http://bl.ocks.org/1653763
window.onload = function() {
var w = $('#chart').width(),
h = (w * 0.45);
proj = {
@nkhine
nkhine / README.md
Created July 10, 2012 07:16 — forked from mbostock/.block
Superformula Tweening (Christophe Viau)

Christophe Viau implemented a new shape type for D3.js based on superformulas. One nice property of these shapes is that you can easily tween between two shapes by simply interpolating the control points. Click on the blue shapes to try it!

@nkhine
nkhine / debt.csv
Created July 10, 2012 10:34 — forked from mbostock/.block
The Euro Debt Crisis
creditor debtor amount risk
Britain France 22.4 3
Britain Greece 0.55 0
Britain Italy 26 0
Britain Portugal 19.4 0
Britain United States 345 1
France Germany 53.8 1
France Greece 53.9 0
France Ireland 17.3 0
France Italy 366 0
@nkhine
nkhine / index.html
Created July 10, 2012 11:54 — forked from eugenepyvovarov/index.html
Google Maps + D3
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"/>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script type="text/javascript" src="http://github.com/mbostock/d3/raw/v1.8.4/d3.js"></script>
<style type="text/css">
html, body, #map {
width: 100%;
@nkhine
nkhine / README.md
Created July 12, 2012 12:36 — forked from mbostock/.block
Twitter SVG Logo
@nkhine
nkhine / client.js
Created July 20, 2012 14:03
D3.js tutorial
function thisClient() {
"use strict"
var self = this
var width = 960,
height = 500,
centered, data
this.init = function() {
//now.receiveLocation = function(message) {