This file contains 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
orm.db.defineType('GeoJSON', { | |
datastoreType: function GeoJSON_datastoreType(prop) { | |
return 'geometry(Geometry, 4326)'; | |
}, | |
datastoreGet: function GeoJSON_datastoreGet(prop, helper) { | |
return 'ST_AsGeoJSON(' + prop.mapsTo + ')::JSON'; | |
}, | |
valueToProperty: function GeoJSON_valueToProperty(value, prop) { | |
if (typeof value == "string") return JSON.parse(value); | |
else return value; |
This file contains 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 ogr2ogr = require('../') | |
var sampleNogeom = __dirname+'/samples/sample-nogeom.csv' | |
// createdb|dropdb nogeomtest | |
ogr2ogr(sampleNogeom) | |
.format("PostgreSQL") | |
.project("EPSG:4326") | |
.destination('PG:dbname=nogeomtest') |
This file contains 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 getXml(url, cb) { | |
var xhr = new XMLHttpRequest(); | |
xhr.open("GET", url, true); | |
xhr.onreadystatechange = function (e) { | |
if (xhr.readyState == 4) { | |
var code = xhr.status; | |
if (code >= 200 && code < 400) { | |
cb(null, xhr.responseXML); | |
} else { | |
var err = new Error(xhr.responseText); |
This file contains 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
session rights /lefigaro.fr s4sfqJBi5_euHMCU3WBAS68g5Axx5kCW [ 'read' ] [ 'write lefigaro.fr', 'auth' ] | |
set sid:s4sfqJBi5_euHMCU3WBAS68g5Axx5kCW | |
GET 200 20.783 ms /lefigaro.fr?auth=01020304 - 49 | |
set right=auth&type=json http://localhost:3000/lefigaro.fr?auth=01020304 | |
set right=auth&type=json http://localhost:3000/lefigaro.fr?auth=01020304 | |
set sid:zWqh4RmAw5HX9i3ShrUavG2JUf8oH6sZ | |
GET 302 55.039 ms /lefigaro.fr/test/write?_token=123456 - 102 | |
vary for { right: 'read,write lefigaro.fr' } | |
vary for { right: 'read' } | |
vary for { right: 'write lefigaro.fr' } |
This file contains 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
Comment soumettre un formulaire ? | |
1. Validation en javascript | |
Quand valide, javascript envoie le formulaire en XHR - ou si on veut | |
gagner du temps, on peut soumettre le formulaire par HTML. | |
2. POST vers l'url du document | |
La route s'occupe de faire la requête correcte vers la ressource concernée, | |
et ce qui est renvoyé dépend du client: | |
- si HTML, on fait une redirection |
This file contains 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
Resource.relationMappings = { | |
27 + children: { | |
28 + relation: Model.ManyToManyRelation, | |
29 + modelClass: Resource, | |
30 + join: { | |
31 + from: 'raja_resources.id', | |
32 + through: { | |
33 + from: 'raja_relations.parent_id', | |
34 + to: 'raja_relations.child_id' | |
35 + }, |
This file contains 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
From bffadf6a55e99291270b7c95c4787ff19ef63348 Mon Sep 17 00:00:00 2001 | |
From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lal?= <kapouer@melix.org> | |
Date: Wed, 22 Dec 2010 14:31:03 +0100 | |
Subject: [PATCH] mysql adapter should create table with default charset. | |
This fixes : | |
https://rails.lighthouseapp.com/projects/8994/tickets/5830-mysql-adapter-should-create-table-with-default-charset | |
--- | |
.../connection_adapters/mysql2_adapter.rb | 4 ++++ | |
1 files changed, 4 insertions(+), 0 deletions(-) |
This file contains 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
--- a/doc/node.1 | |
+++ b/doc/node.1 | |
@@ -44,7 +44,7 @@ | |
.SH ENVIRONMENT VARIABLES | |
.IP NODE_PATH | |
-':'-separated list of directories prefixed to the module search path, | |
+\':\'\-separated list of directories prefixed to the module search path, | |
require.paths. | |
This file contains 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
--- a/src/node_crypto.cc | |
+++ b/src/node_crypto.cc | |
@@ -98,11 +98,23 @@ | |
String::Utf8Value sslmethod(args[0]->ToString()); | |
if (strcmp(*sslmethod, "SSLv2_method") == 0) { | |
+#ifndef OPENSSL_NO_SSL2 | |
method = SSLv2_method(); | |
+#else | |
+ return ThrowException(Exception::Error(String::New("SSLv2 methods disabled"))); |
This file contains 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
--- sound/pci/hda/patch_cirrus.c.orig 2011-09-02 10:07:32.013460479 +0200 | |
+++ sound/pci/hda/patch_cirrus.c 2011-09-02 10:07:45.604995395 +0200 | |
@@ -922,7 +922,7 @@ | |
if (spec->board_config == CS420X_MBP53 || | |
spec->board_config == CS420X_MBP55 || | |
spec->board_config == CS420X_IMAC27) { | |
- unsigned int gpio = hp_present ? 0x02 : 0x08; | |
+ unsigned int gpio = hp_present ? 0x04 : 0x08; | |
snd_hda_codec_write(codec, 0x01, 0, | |
AC_VERB_SET_GPIO_DATA, gpio); |
OlderNewer