This file contains hidden or 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
JSON Cache Example with node.js | |
This is an example, not a useful library. | |
It demostrates bi-directional JSON transport to a simple service capable of caching arbitrary JSON objects by id. To run the example, type: | |
$ node server.js | |
"Browse to http://127.0.0.1:8181/client.htm to see the client test page" |
This file contains hidden or 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
# your terminal change to use bash profile: | |
source ~/.bash_profile | |
# clean The old npm: | |
curl https://npmjs.org/install.sh | sudo clean=yes sh | |
# ref. http://jason.pureconcepts.net/2011/12/installing-node-js-npm-redis-mac-os-x/ |
This file contains hidden or 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 http = require('http'); | |
var url = require('url'); | |
var mime = require('mime'); | |
var fs = require('fs'); | |
var port = process.env.PORT || 40000; | |
http.createServer(function(req, res) { | |
var u = url.parse(req.url); | |
var filename = __dirname + '/static' + u.pathname; | |
fs.exists(filename, function(exists) { |
This file contains hidden or 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 node | |
// source ~/.bash_profile | |
// Jalal.Hejazi | |
// Really simple http server in Node.js which allows you to browse and download | |
// any server's file directly from your browser. | |
var http = require('http'); | |
var fs = require('fs'); | |
var port = 1111; |
This file contains hidden or 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
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAADzCAYAAAA8Yis7AAAgAElEQVR4XuxdB3wcxd2d3b3edTqderEkd7mCK81gDAEDAT5M7wQSCJBAqIGEkAQCBEwngYQSAoGAKaGFXkNzwQ13yerSSdd73/3erLXK6nwnnVwIhjvQ7853u7O7M7Nv3//9yzCk8Cr0QKEHCj2wj/QAs4+cZ+E0Cz1Q6IFCD5ACYBUmQaEHCj2wz/RAAbD2maEqnGihBwo9UACswhwo9EChB/aZHigA1j4zVIUTLfRAoQcKgFWYA4UeKPTAPtMDBcDaZ4aqcKKFHij0QAGwCnOg0AOFHthneqAAWPvMUBVOtNADhR4oAFZhDhR6oNAD+0wPFABrnxmqwokWeqDQAwXAKsyBQg8UemCf6YECYO0zQ1U40UIPFHqgAFiFOVDogUIP7DM9UACsfWaoCida6IFCDxQAqzAHCj1Q6IF9pgcKgLXPDNXePVFBEFiGYfjRHoXuR/fJ3Bff4ysGb7l/37Hbf4+5q+cw2nMubL/v9kABsPbdsdvjZ05BhoII/oSB98FjUGCRwGc3D5y17eHaLADZbvb4d2j3AmB9hwYz81IkAMrFnGQAtTeAaZd7djiml+2aJDYnHTDz37t8IoUdv3U9UACsb92Q7LkTkpllInOSgCAbUO25o+61loYws2ygVgCqvdb335qGC4D1rRmK3TuR4djUHjLldu8Ev9m9RXCTzNhd0ea+2dMtHC3fHigAVr499S3dTs6WcuhMO2lG39JL+UZPa6CvhjDPb/QECgfbpR4oANYuddu3Zyc5e9qDwvi35wL3wpnI+mmQie2FwxSa3As9UACsvdCpe6NJuQePhgvQY+yDpp7kgdwbXbTLbRbY1i533Te+YwGwvvEuz++Ama58uUa1j4jm30pwyq/3xa3kOpgYUzaKfQub7qUeKADWXurY0TSbK7hygEVJsVGjaXJvbyvNG+kmzmceyW/4bNv |
This file contains hidden or 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 html> | |
<html> | |
<head> | |
<title> CPH Skoler</title> | |
<style> | |
.skole{ | |
color:green ; | |
} | |
</style> |
This file contains hidden or 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
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAgAElEQVR4Xu19DVBe1Zn/s2N2xK3bJK0VcLQhju5CvyC2NiGjAf6thqTaQPoBdNt8jRqwrUlsDUnaBki7SYhWwLaSRCeQaIXstiGuNpCoBdQJpO0Kqd2Srq7BtlNIdAzZ2prOprv/8zt68AWB933vPefcr+fOOBl57z0fv3Pu7z7Pc56Pv/nf/zv/f8QXI8AIMAIBQOBvmLACsEo8REaAEZAIMGHxRmAEGIHAIMCEFZil4oEyAowAExbvAUaAEQgMAkxYgVkqHigjwAgwYfEeYAQYgcAgwIQVmKXigTICjAATFu8BRoARCAwCTFiBWSoeKCPACDBh8R5gBBiBwCDAhBWYpeKBMgKMABMW7wFGgBEIDAJMWIFZKh4oI8AIMGHxHmAEGIHAIMCEFZilsjvQ4VOnaGBggPr7++ns2bOjnb/88ss0eHJwzGAGBwfp93/4XdwBXvKe91FmZuaY+2bMnEHZ2dmjf0tJSaG5c+fS7NmzKWPWrLht8g3RQoAJK1rr/Y7Z9h47RkNDQ3T8+HE6ceIEnRo+Rc8efWZKVKZdMI3mzc0dc0/KRW8SzWSXajv2d/zt1ddembKvj330WkpLS5OkBrJLTU2lgvz8iK9adKfPhBWRte8XhNTZ2UmnT5+m3p5emkwqum7+9ZSalirJASSRnp4uyGlyItINH8Y5PDxMvb29pKS53mM9dP6v58d0paS17JxsSWj5gsRsjlP3vLm9xBBgwkoMp8DdNSCkl66uLjpy5Ij4t5Ne/9Pro3O4/LIrKCMjg+blzqNLL72UcnJyKCsri9KE9OLXa0SopX19fW9KgUJd7e7qlsT24ksvjA4Zkl9+fgHl5eUxgfl1IV2OiwnLJYB+eVwRVHd3t3yZY1WtT37ihlC/xEp6fPrpp8eQMwissHARLViwgAoKCignxlbml3XjcSSHABNWcnj55u5BYfyGBAWC6u |
This file contains hidden or 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
try to use nodebrew: | |
nodebrew version Manager> | |
https://github.com/Jalalhejazi/nodebrew | |
UnInstall node older versions: | |
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0"> | |
<xsl:output encoding="utf-8" method="text" indent="no"/> | |
<xsl:template match="/"> | |
<xsl:apply-templates select="node()"> | |
<xsl:with-param name="indent" select="''"/> | |
</xsl:apply-templates> | |
</xsl:template> |
This file contains hidden or 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
<?xml version="1.0"?> | |
<?xml-stylesheet type="text/xsl" href="book.xsl"?> | |
<books> | |
<book isbn="1-861002-85-8"> | |
<title>Professional Java XML Programming</title> | |
<publisher>Wrox Press</publisher> | |
<price>35.99</price> | |
<pages>772</pages> | |
<chapters>13</chapters> | |
<appendices>13</appendices> |