1
0
mirror of https://github.com/mgerb/mywebsite synced 2026-01-11 18:32:50 +00:00

updated bunch of file paths and changed the way posts are loaded

This commit is contained in:
2016-01-05 12:28:04 -06:00
parent 4bb8cae81e
commit 6ab45fe935
13249 changed files with 317868 additions and 2101398 deletions

4
node_modules/libbase64/.npmignore generated vendored Normal file
View File

@@ -0,0 +1,4 @@
.travis.yml
.jshintrc
Gruntfile.js
test

19
node_modules/libbase64/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,19 @@
Copyright (c) 2014 Andris Reinman
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:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

108
node_modules/libbase64/README.md generated vendored Normal file
View File

@@ -0,0 +1,108 @@
# libbase64
Encode and decode base64 strings.
## Usage
Install with npm
npm install libbase64
Require in your script
```javascript
var libbase64 = require('libbase64');
```
### Encode values
Encode Buffer objects or unicode strings with
libbase64.encode(val) → String
Where
* **val** is a Buffer or an unicode string
**Example**
```javascript
libbase64.encode('jõgeva');
// asO1Z2V2YQ==
```
### Wrap encoded values
To enforce soft line breaks on lines longer than selected amount of characters, use `wrap`
libbase64.wrap(str[, lineLength]) → String
Where
* **str** is a base64 encoded string
* **lineLength** (defaults to 76) is the maximum allowed line length
**Example**
```javascript
libbase64.wrap('asO1Z2V2asO1Z2V2asO1Z2V2YQ==', 10)
// asO1Z2V2as\r\n
// O1Z2V2asO1\r\n
// Z2V2YQ==
```
### Transform Streams
`libbase64` makes it possible to encode and decode streams with `libbase64.Encoder` and `libbase64.Decoder` constructors.
### Encoder Stream
Create new Encoder Stream with
var encoder = new libbase64.Encoder([options])
Where
* **options** is the optional stream options object with an additional option `lineLength` if you want to use any other line length than the default 76 characters (or set to `false` to turn the soft wrapping off completely)
**Example**
The following example script reads in a file, encodes it to base64 and saves the output to a file.
```javascript
var libbase64 = require('libbase64');
var fs = require('fs');
var source = fs.createReadStream('source.txt');
var encoded = fs.createReadStream('encoded.txt');
var encoder = new libbase64.Encoder();
source.pipe(encoder).pipe(encoded);
```
### Decoder Stream
Create new Decoder Stream with
var decoder = new libbase64.Decoder([options])
Where
* **options** is the optional stream options object
**Example**
The following example script reads in a file in base64 encoding, decodes it and saves the output to a file.
```javascript
var libbase64 = require('libbase64');
var fs = require('fs');
var encoded = fs.createReadStream('encoded.txt');
var dest = fs.createReadStream('dest.txt');
var decoder = new libbase64.Decoder();
encoded.pipe(decoder).pipe(dest);
```
## License
**MIT**

201
node_modules/libbase64/lib/libbase64.js generated vendored Normal file
View File

@@ -0,0 +1,201 @@
'use strict';
var stream = require('stream');
var util = require('util');
var Transform = stream.Transform;
// expose to the world
module.exports = {
encode: encode,
decode: decode,
wrap: wrap,
Encoder: Encoder,
Decoder: Decoder
};
/**
* Encodes a Buffer into a base64 encoded string
*
* @param {Buffer} buffer Buffer to convert
* @returns {String} base64 encoded string
*/
function encode(buffer) {
if (typeof buffer === 'string') {
buffer = new Buffer(buffer, 'utf-8');
}
return buffer.toString('base64');
}
/**
* Decodes a base64 encoded string to a Buffer object
*
* @param {String} str base64 encoded string
* @returns {Buffer} Decoded value
*/
function decode(str) {
str = (str || '');
return new Buffer(str, 'base64');
}
/**
* Adds soft line breaks to a base64 string
*
* @param {String} str base64 encoded string that might need line wrapping
* @param {Number} [lineLength=76] Maximum allowed length for a line
* @returns {String} Soft-wrapped base64 encoded string
*/
function wrap(str, lineLength) {
str = (str || '').toString();
lineLength = lineLength || 76;
if (str.length <= lineLength) {
return str;
}
return str.replace(new RegExp('.{' + lineLength + '}', 'g'), '$&\r\n').trim();
}
/**
* Creates a transform stream for encoding data to base64 encoding
*
* @constructor
* @param {Object} options Stream options
* @param {Number} [options.lineLength=76] Maximum lenght for lines, set to false to disable wrapping
*/
function Encoder(options) {
// init Transform
this.options = options || {};
if (this.options.lineLength !== false) {
this.options.lineLength = this.options.lineLength || 76;
}
this._curLine = '';
this._remainingBytes = false;
this.inputBytes = 0;
this.outputBytes = 0;
Transform.call(this, this.options);
}
util.inherits(Encoder, Transform);
Encoder.prototype._transform = function(chunk, encoding, done) {
var b64, _self = this;
if (encoding !== 'buffer') {
chunk = new Buffer(chunk, encoding);
}
if (!chunk || !chunk.length) {
return done();
}
this.inputBytes += chunk.length;
if (this._remainingBytes && this._remainingBytes.length) {
chunk = Buffer.concat([this._remainingBytes, chunk]);
this._remainingBytes = false;
}
if (chunk.length % 3) {
this._remainingBytes = chunk.slice(chunk.length - chunk.length % 3);
chunk = chunk.slice(0, chunk.length - chunk.length % 3);
} else {
this._remainingBytes = false;
}
b64 = this._curLine + encode(chunk);
if (this.options.lineLength) {
b64 = wrap(b64, this.options.lineLength);
b64 = b64.replace(/(^|\n)([^\n]*)$/, function(match, lineBreak, lastLine) {
_self._curLine = lastLine;
return lineBreak;
});
}
if (b64) {
this.outputBytes += b64.length;
this.push(b64);
}
done();
};
Encoder.prototype._flush = function(done) {
if (this._remainingBytes && this._remainingBytes.length) {
this._curLine += encode(this._remainingBytes);
}
if (this._curLine) {
this._curLine = wrap(this._curLine, this.options.lineLength);
this.outputBytes += this._curLine.length;
this.push(this._curLine, 'ascii');
this._curLine = '';
}
done();
};
/**
* Creates a transform stream for decoding base64 encoded strings
*
* @constructor
* @param {Object} options Stream options
*/
function Decoder(options) {
// init Transform
this.options = options || {};
this._curLine = '';
this.inputBytes = 0;
this.outputBytes = 0;
Transform.call(this, this.options);
}
util.inherits(Decoder, Transform);
Decoder.prototype._transform = function(chunk, encoding, done) {
var b64, buf;
chunk = chunk.toString('ascii');
if (!chunk || !chunk.length) {
return done();
}
this.inputBytes += chunk.length;
b64 = (this._curLine + chunk);
this._curLine = '';
b64 = b64.replace(/[^a-zA-Z0-9+\/=]/g, '');
if (b64.length % 4) {
this._curLine = b64.substr(-b64.length % 4);
if (this._curLine.length == b64.length) {
b64 = '';
} else {
b64 = b64.substr(0, this._curLine.length);
}
}
if (b64) {
buf = decode(b64);
this.outputBytes += buf.length;
this.push(buf);
}
done();
};
Decoder.prototype._flush = function(done) {
var b64, buf;
if (this._curLine) {
buf = decode(this._curLine);
this.outputBytes += buf.length;
this.push(buf);
this._curLine = '';
}
done();
};

79
node_modules/libbase64/package.json generated vendored Normal file
View File

@@ -0,0 +1,79 @@
{
"_args": [
[
"libbase64@^0.1.0",
"/home/mitchell/Desktop/test-mywebsite/mywebsite/node_modules/libmime"
]
],
"_from": "libbase64@>=0.1.0 <0.2.0",
"_id": "libbase64@0.1.0",
"_inCache": true,
"_installable": true,
"_location": "/libbase64",
"_npmUser": {
"email": "andris@node.ee",
"name": "andris"
},
"_npmVersion": "1.4.3",
"_phantomChildren": {},
"_requested": {
"name": "libbase64",
"raw": "libbase64@^0.1.0",
"rawSpec": "^0.1.0",
"scope": null,
"spec": ">=0.1.0 <0.2.0",
"type": "range"
},
"_requiredBy": [
"/buildmail",
"/libmime"
],
"_resolved": "https://registry.npmjs.org/libbase64/-/libbase64-0.1.0.tgz",
"_shasum": "62351a839563ac5ff5bd26f12f60e9830bb751e6",
"_shrinkwrap": null,
"_spec": "libbase64@^0.1.0",
"_where": "/home/mitchell/Desktop/test-mywebsite/mywebsite/node_modules/libmime",
"author": {
"name": "Andris Reinman"
},
"bugs": {
"url": "https://github.com/andris9/libbase64/issues"
},
"dependencies": {},
"description": "Encode and decode base64 encoded strings",
"devDependencies": {
"chai": "~1.8.1",
"grunt": "~0.4.1",
"grunt-contrib-jshint": "~0.8.0",
"grunt-mocha-test": "~0.10.0"
},
"directories": {},
"dist": {
"shasum": "62351a839563ac5ff5bd26f12f60e9830bb751e6",
"tarball": "http://registry.npmjs.org/libbase64/-/libbase64-0.1.0.tgz"
},
"homepage": "https://github.com/andris9/libbase64",
"keywords": [
"base64",
"mime"
],
"license": "MIT",
"main": "lib/libbase64.js",
"maintainers": [
{
"name": "andris",
"email": "andris@node.ee"
}
],
"name": "libbase64",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git://github.com/andris9/libbase64.git"
},
"scripts": {
"test": "grunt"
},
"version": "0.1.0"
}