Skip to content

Instantly share code, notes, and snippets.

View carlos8f's full-sized avatar

Starbuck Starfish carlos8f

View GitHub Profile
@cpsubrian
cpsubrian / Preferences.sublime-settings
Last active January 6, 2016 21:37
SublimeText Setup for React Stuff
{
"auto_complete": false,
"bold_folder_labels": true,
"color_scheme": "Packages/User/SublimeLinter/Monokai Extended (SL).tmTheme",
"font_face": "Source Code Pro",
"font_size": 13.0,
"ignored_packages":
[
"Vintage"
],
@3rd-Eden
3rd-Eden / README.md
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.

@carlos8f
carlos8f / jabberwocky.txt
Created May 16, 2014 00:08
Jabberwocky
'Twas brillig, and the slithy toves
Did gyre and gimble in the wabe:
All mimsy were the borogoves,
And the mome raths outgrabe.
"Beware the Jabberwock, my son!
The jaws that bite, the claws that catch!
Beware the Jubjub bird, and shun
The frumious Bandersnatch!"
He took his vorpal sword in hand:

Install Dnsmasq on OSX

This will allow any url having the non-existant TLD .dev to resolve to your locale machine.

Install dnsmasq and run as a service

$ brew update
@rvagg
rvagg / leveldb.js.md
Created January 10, 2014 01:48
Modular JavaScript storage for databases

Summary: Introduce a totally new approach to highly modular database storage, i.e. taking the vibrant Node.js Level ecosystem below LevelUP to the storage layer in 100% JavaScript.*

Facebook recently released their fork of LevelDB, named "RocksDB". Their fork is a true fork in the sense that it is not backward compatible. Facebook have added a number of new features to RocksDB but more importantly they are attempting to make something more flexible that can be adjusted to suit different workloads.

But this is not about Facebook or RocksDB because they are still riffing on the same tune, albeit with a faster tempo. But their attempt at flexibility hints at the possibilities of modular storage technologies.

The Node.js Level* ecosystem is vibrant and growing rapidly. Most of this growth is in user-land above the storage layer. In 2014 I would like to see more innovation at the storage layer itself. Facebook are demonstrating a very limited kind of modularity in RocksDB but we believe that Node.js is mu

var http = require('http');
var cache = {};
function curl(url, cb) {
if (cache[url])
// WRONG: synchronous callback
return cb(null, cache[url]);
var data = '';
@carlj
carlj / rsa-encryption.md
Last active February 28, 2020 07:01
RSA large File En- and Decryption

RSA File De- and Encryption

Docu for encrypt and decrypt a large file with AES and RSA

Keypairs

Generate RSA Keypairs

//generates a private Key with 8196 Bit. 
openssl genrsa -out private.pem 8196
@carlos8f
carlos8f / .gitignore
Last active December 22, 2015 16:39
motley gist template
node_modules
npm-debug.log
@falz94dev
falz94dev / gist:6148935
Last active December 20, 2015 14:39
eliminar
We couldn’t find that file to show.
@cpsubrian
cpsubrian / README.md
Last active December 17, 2015 03:19
Streams instead of ORM.

Streams instead of ORM

Pros:

  • Streams?
  • More manual query control.
  • Combine different transforms depending on use case.

Cons: