Skip to content

Instantly share code, notes, and snippets.

@kyriosli
kyriosli / ssl.md
Created October 16, 2014 07:37
https key and cert, and java keystore

Generate RSA private key

openssl genrsa -des3 -out ssl.key 2048

Remove passphrase if you don't want to enter pem passphrase each time

openssl rsa -in ssl.key -out ssl.key

Generate cert sign request file

@maccman
maccman / canvas.physics.coffee
Created April 11, 2013 02:52
A canvas physics engine in 160 lines of CoffeeScript.
class Point
constructor: (@x = 0, @y = 0) ->
if isNaN(@x) or isNaN(@y)
throw new Error('Invalid coords')
add: (point) ->
@x += point.x
@y += point.y
subtract: (point) ->
@piatra
piatra / app.js
Created June 27, 2012 12:14
xhr2 + nodejs + filereader = resumable uploads
var http = require('http')
, formidable = require('formidable')
, fs = require('fs')
, qs = require('querystring')
, util = require('util')
, uploads = {};
http.createServer(function(req, res){
if(req.method == 'GET') {
if(req.url != '/favicon.ico') {