- BigPipe and React
- React components
- Share state
- Server Side rendering
- Modularization of components
- Re-initialization
- checksum
- event adding
- html bloat
- JSX
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 zip = require('./zip'), | |
sys = require('sys'), | |
fs = require('fs'); | |
fs.readFile( '/etc/hosts', function( err, res ){ | |
var data = res.toString(), | |
unzip = data.length, | |
start = +new Date, | |
deflate = zip.deflate( data ), | |
zipper = deflate.length, |
[Google recently announced][poodle] that there is an exploit in SSLv3, this vulnerability is know as POODLE. There is no other option than to disable SSLv3 in order to combat this major flaw. There have already been [guides on how to disable this in different servers][guides]. But nothing excised for Node.js yet, until now. In order to resolve this for Node.js we need to use various of undocumented options and modules.
In the index.js
file below you can see an example of how you can protect your HTTPS server
against the POODLE attack. It uses the secureOptions
option to pass in constants in to the
SSL context which is created by node.
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
// Build the https based part & read the key and crt file that is required to encrypte the server / client connection | |
var ssl = https.createServer({ | |
key: fs.readFileSync( "./ssl/ssl.private.key" ).toString() | |
, cert: fs.readFileSync( "./ssl/ssl.crt" ).toString() | |
}); | |
// This is the part what it's all about, we are going to route all | |
// https based requires to the default app handler | |
ssl.addListener( "request", function sllRequestListener( req, res ){ | |
req.ssl = true; // just add an extra flag so we can see if it was forwarded from https |
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
/** @jsx React.DOM **/ | |
<div> | |
<FormattedMessage | |
message={getIntlMessage('post.meta')} | |
num={props.post.comments.length} | |
ago={<FormattedRelative value={props.post.date} />} | |
/> | |
<span>{random}</span> | |
</div> |
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 Car() { | |
this.type = 'fo sho' | |
} | |
Object.defineProperty(Car.prototype, 'is', { | |
get: function getterson() { | |
var car = this; | |
function named(args) { | |
args = named.curry.concat(Array.prototype.slice.call(arguments, 0)); |
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
############################################################################### | |
## Includes | |
############################################################################### | |
## | |
## It is possible to include additional configuration parts from other files or | |
## directories. | |
# | |
# include /etc/monit.d/* | |
# | |
# |
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
Copyright (c) 2011 Arnout Kazemier, <http://blog.3rd-Eden.com> | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to | |
permit persons to whom the Software is furnished to do so, subject to | |
the following conditions: | |
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
npm WARN using --force I sure hope you know what you are doing. | |
npm http GET http://registry.nodejitsu.com/primus | |
npm http 304 http://registry.nodejitsu.com/primus | |
npm http GET http://registry.npmjs.org/primus/-/primus-1.5.2.tgz | |
npm http 200 http://registry.npmjs.org/primus/-/primus-1.5.2.tgz | |
npm http GET http://registry.nodejitsu.com/load | |
npm http GET http://registry.nodejitsu.com/extendable | |
npm http 304 http://registry.nodejitsu.com/load | |
npm http 304 http://registry.nodejitsu.com/extendable | |
npm http GET http://registry.npmjs.org/extendable/-/extendable-0.0.6.tgz |
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 () { | |
// | |
// Set name of the visibility change event. | |
// | |
var visibilityChange, hidden; | |
if (typeof document.hidden !== 'undefined') { | |
hidden = 'hidden'; | |
visibilityChange = 'visibilitchange'; | |
} else if (typeof document.webkitHidden !== 'undefined') { | |
hidden = 'webkitHidden'; |
NewerOlder