Skip to content

Instantly share code, notes, and snippets.

View 3rd-Eden's full-sized avatar
I have approximate knowledge of many things

Arnout Kazemier 3rd-Eden

I have approximate knowledge of many things
View GitHub Profile
3rd-Eden /
Last active August 29, 2015 14:19 — forked from alessioalex/
3rd-Eden / index.js
Last active August 29, 2015 14:19
'use strict';
var fs = require('fs')
, path = require('path')
, Primus = require('primus')
, EventEmitter = require('events').EventEmitter
, Socket = Primus.createSocket({ transformer: '' });
var server = require('http').createServer(function (req, res) {
res.setHeader('Content-Type', 'text/html');
3rd-Eden / index.js
Created April 1, 2015 12:10
Using the BackBone .extend pattern with React
'use strict';
var React = require('react');
React.Component.extend = require('extendible');
var MyComponent = React.Component.extend({
state: {
what: 'extend'
render: function () {
3rd-Eden /
Created March 16, 2015 13:04
BigPipe & React sitting a tree.
  • BigPipe and React
  • React components
  • Share state
  • Server Side rendering
  • Modularization of components
  • Re-initialization
    • checksum
    • event adding
    • html bloat
  • JSX
/** @jsx React.DOM **/
ago={<FormattedRelative value={} />}
0 info it worked if it ends with ok
1 verbose cli [ 'node', '/Users/V1/.nvm/v0.10.35/bin/npm', 'install', '.' ]
2 info using npm@2.3.0
3 info using node@v0.10.35
4 warn package.json utf-8-validate@1.0.0 No README data
5 verbose install where, deps [ '/Users/V1/Projects/websockets/utf-8-validate',
5 verbose install [ 'bindings', 'nan' ] ]
6 verbose install where, peers [ '/Users/V1/Projects/websockets/utf-8-validate', [] ]
7 info preinstall utf-8-validate@1.0.0
8 silly cache add args [ 'bindings@1.2.x', null ]
3rd-Eden / failing.js
Created December 16, 2014 21:58
URL parsing regexp.
3rd-Eden / blobhack.js
Last active August 29, 2015 14:08
URL generation inside WebWorker which is generated through a blob.
var x = new Blob(['var loc = location; if (location.protocol === "blob:") loc = new URL(unescape(loc.pathname)); console.log(new URL("/foo", loc)); '], { type: 'text/javascript' })
, y = URL.createObjectURL(x)
, w = new Worker(y);
3rd-Eden /
Last active January 4, 2021 10:20
Protecting against POODLE in node.js

[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.

12:55:01 PM <omnidan> hi
12:55:58 PM ⇐ therealkoopa quit ( Ping timeout: 255 seconds
12:56:07 PM <omnidan> is it possible to get the query in the authorization middleware without having a http server running? e.g. directly connecting from a nodejs primus client to a primus server
12:56:29 PM <omnidan> also, is it possible to connect with a to primus with in the backend?
1:06:03 PM → __quim_ and Kullt2 joined ⇐ __quim and Kullt quit ↔ therealkoopa popped in
1:34:29 PM <_3rdEden> hi
1:35:05 PM <_3rdEden> How would you get a request to your server when there isn't a server running omnidan ?
1:35:51 PM <_3rdEden> omnidan: it should be possible to connect with a to a primus + backend
1:36:00 PM <omnidan> _3rdEden: well there is a http server running, but I'm connecting via nodejs directly to primus, so it doesn't /use/ the server
1:36:13 PM <omnidan> at least I think so, I'm not familiar with the inter