View index.js
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
const express = require('express'); | |
const app = express(); | |
const http = require('http'); | |
const server = http.createServer(app); | |
const xmlparser = require('express-xml-bodyparser'); | |
app.use(xmlparser()); | |
app.post('/xml', (req, res, next) => { | |
console.log(req.body); // handle parsed xml |
View express-xml-bodyparser.js
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 express = require('express'), | |
typeis = require('type-is'); | |
var app = express(); | |
var xmlParseOptions = { | |
async: false, // Setting to `true` causes issues with exceptions | |
explicitArray: false, | |
trim: true, | |
normalize: true, |
View nginx-libressl-static.sh
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
#!/usr/bin/env bash | |
# Names of latest versions of each package | |
export VERSION_PCRE=pcre-8.39 | |
export VERSION_ZLIB=zlib-1.2.8 | |
export VERSION_LIBRESSL=libressl-2.4.2 | |
export VERSION_NGINX=nginx-1.11.3 | |
# URLs to the source directories | |
export SOURCE_LIBRESSL=http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/ |
View express-xml-bodyparser-sample.js
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 express = require('express'); | |
var app = express(); | |
var http = require('http'); | |
var server = http.createServer(app); | |
var xmlparser = require('express-xml-bodyparser'); | |
// fyi: it'd be better to attach the parser to wanted routes only | |
app.use(xmlparser()); | |
app.post('/xml', function(req, res, next) { |
View gist:ea540099097f7ec4c2f5
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
--- symfony/vendor/solarium/solarium/library/Solarium/Core/Client/Adapter/Curl.php (revision ) | |
+++ symfony/vendor/solarium/solarium/library/Solarium/Core/Client/Adapter/Curl.php (revision ) | |
@@ -155,10 +155,6 @@ | |
curl_setopt($handler, CURLOPT_PROXY, $proxy); | |
} | |
- if (!isset($options['headers']['Content-Type'])) { | |
- $options['headers']['Content-Type'] = 'text/xml; charset=utf-8'; | |
- } | |
- |
View rss.jade
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
doctype xml | |
rss(version='2.0') | |
channel | |
title= feed.title | |
description= feed.description | |
link= feed.link | |
language= feed.en | |
for item in posts | |
item | |
title= item.title |