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
import javax.xml.transform.URIResolver; | |
import javax.xml.transform.Source; | |
import javax.xml.transform.TransformerException; | |
import javax.xml.transform.dom.DOMSource; | |
import org.htmlcleaner.HtmlCleaner; | |
import org.htmlcleaner.CleanerProperties; | |
import org.htmlcleaner.TagNode; | |
import org.htmlcleaner.DomSerializer; | |
import org.htmlcleaner.PrettyXmlSerializer; |
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 serialization of a JavaScript object to XML | |
// TODO: test suite | |
function json2xml(o, tab) { | |
var xml=[], addChild = function(name, v, ind) { | |
var childs; | |
if (v instanceof Array) { | |
for (var i=0, n=v.length; i<n; i++) | |
addChild(name, v[i], ind); | |
} else if (typeof(v) == "object") { | |
xml.push(ind, "<", name); |
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
@echo off | |
:: Copyright © 2010-2011 Olivier Mengu‚ | |
:: | |
:: This program is free software: you can redistribute it and/or modify | |
:: it under the terms of the GNU General Public License as published by | |
:: the Free Software Foundation, either version 3 of the License, or | |
:: (at your option) any later version. | |
:: | |
:: This program is distributed in the hope that it will be useful, | |
:: but WITHOUT ANY WARRANTY; without even the implied warranty of |
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/perl | |
# Author: Olivier Mengué | |
# 2010-08-21 | |
use utf8; | |
use strict; | |
use warnings; | |
use Acme::CPANAuthors; | |
use ORDB::CPANTS 0.05; | |
use List::Util qw(reduce); |
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
<xsl:stylesheet version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<!-- My answer to StackOverflow #3747049 --> | |
<xsl:output method="text"/> | |
<xsl:key name="ns" match="//* | //*/@* | //*/processing-instruction()" use="namespace-uri(.)"/> | |
<xsl:key name="ns-prefixes" match="//* | //*/@*" use="concat(substring-before(name(.), ':'), ':', namespace-uri(.))"/> | |
<!-- Only the nodes --> | |
<xsl:variable name="all-nodes" select="//* | //*/@*"/> |
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
@mode con cp select=65001 |
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
# Could be used for a future version of POE::Component::Logger to avoid polluting the global namespace. | |
use feature 'switch'; | |
#use strict; | |
# Global Logger | |
sub Logger::log | |
{ | |
print "global: $_[1]\n"; | |
} |
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
#!perl | |
BEGIN { | |
unless ($ENV{RELEASE_TESTING}) { | |
require Test::More; | |
Test::More::plan(skip_all => 'these tests are for release candidate testing'); | |
} | |
} | |
use Test::More; |
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
:: Run with full administrator rights | |
netsh wlan export profile folder=. key=clear |
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
--- mirrors.json.orig Sat Mar 12 16:43:05 2011 | |
+++ mirrors.json Sun Mar 13 16:13:27 2011 | |
@@ -2223,7 +2223,7 @@ | |
"name" : "crihan.fr", | |
"org" : "Centre de Ressources Informatiques de Haute-Normandie (CRIHAN)", | |
"city" : "Rouen", | |
- "region" : null, | |
+ "region" : "Normandie", | |
"country" : "France", | |
"continent" : "Europe", |
OlderNewer