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
'use strict'; | |
const crypto = require('crypto'); | |
const ENCRYPTION_KEY = process.env.ENCRYPTION_KEY; // Must be 256 bits (32 characters) | |
const IV_LENGTH = 16; // For AES, this is always 16 | |
function encrypt(text) { | |
let iv = crypto.randomBytes(IV_LENGTH); | |
let cipher = crypto.createCipheriv('aes-256-cbc', Buffer.from(ENCRYPTION_KEY), iv); |
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
#!/bin/sh | |
# hosts-to-vm.sh | |
# | |
# Made for use alongside the excellent ievms - | |
# https://github.com/xdissent/ievms | |
# | |
# Will export the local hosts (from /etc/hosts) | |
# to a batch script & add that batch script to a Windows VM | |
# The batch script will be executed to import the hosts onto the VM | |
# The batch file seems convoluted, until you only want to append the new hosts. |
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
{ | |
"name": "jsdomdataset", | |
"version": "1.0.0", | |
"description": "", | |
"main": "polyfill-jsdom.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "", | |
"license": "GPL-3.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
{ | |
".123" : "application/vnd.lotus-1-2-3", | |
".3dml" : "text/vnd.in3d.3dml", | |
".3g2" : "video/3gpp2", | |
".3gp" : "video/3gpp", | |
".a" : "application/octet-stream", | |
".aab" : "application/x-authorware-bin", | |
".aac" : "audio/x-aac", | |
".aam" : "application/x-authorware-map", | |
".aas" : "application/x-authorware-seg", |
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
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl http://npmjs.org/install.sh | sh |
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
node.js:116 | |
throw e; // process.nextTick error, or 'error' event on first tick | |
^ | |
TypeError: undefined is not a function | |
at CALL_NON_FUNCTION_AS_CONSTRUCTOR (native) | |
at Schema.path (/usr/local/lib/node/.npm/mongoose/1.1.0/package/lib/mongoose/schema.js:139:24) | |
at Schema.add (/usr/local/lib/node/.npm/mongoose/1.1.0/package/lib/mongoose/schema.js:106:12) | |
at new Schema (/usr/local/lib/node/.npm/mongoose/1.1.0/package/lib/mongoose/schema.js:38:10) |