1
0
mirror of https://github.com/S2-/gitlit synced 2025-08-03 21:00:04 +02:00

initial commit

This commit is contained in:
s2
2018-05-18 10:48:24 +02:00
commit f96e61fd63
1674 changed files with 277039 additions and 0 deletions

20
app/node_modules/speedometer/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,20 @@
Copyright 2013 Mathias Buus
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.

38
app/node_modules/speedometer/README.md generated vendored Normal file
View File

@@ -0,0 +1,38 @@
# speedometer
Speed measurement in Javascript
```
npm install speedometer
```
## Usage
``` js
var speedometer = require('speedometer')
var fs = require('fs')
// Let's measure how fast we can read from /dev/urandom
var speed = speedometer()
var stream = fs.createReadStream('/dev/urandom')
stream.on('data', function(data) {
// Simply call speed with the amount of bytes transferred
var bytesPerSecond = speed(data.length)
console.log(bytesPerSecond+' bytes/second')
})
```
You can always get the current speed by calling `speed()`.
Per default `speedometer` uses a 5 second buffer.
To change this simply pass another value to the constructor
``` js
var speed = speedometer(20) // uses a 20s buffer instead
```
## License
MIT

35
app/node_modules/speedometer/index.js generated vendored Normal file
View File

@@ -0,0 +1,35 @@
var tick = 1
var maxTick = 65535
var resolution = 4
var inc = function() {
tick = (tick + 1) & maxTick
}
var timer = setInterval(inc, (1000 / resolution) | 0)
if (timer.unref) timer.unref()
module.exports = function(seconds) {
var size = resolution * (seconds || 5)
var buffer = [0]
var pointer = 1
var last = (tick-1) & maxTick
return function(delta) {
var dist = (tick - last) & maxTick
if (dist > size) dist = size
last = tick
while (dist--) {
if (pointer === size) pointer = 0
buffer[pointer] = buffer[pointer === 0 ? size-1 : pointer-1]
pointer++
}
if (delta) buffer[pointer-1] += delta
var top = buffer[pointer-1]
var btm = buffer.length < size ? 0 : buffer[pointer === size ? 0 : pointer]
return buffer.length < resolution ? top : (top - btm) * resolution / buffer.length
}
}

49
app/node_modules/speedometer/package.json generated vendored Normal file
View File

@@ -0,0 +1,49 @@
{
"_from": "speedometer@~0.1.2",
"_id": "speedometer@0.1.4",
"_inBundle": false,
"_integrity": "sha1-mHbb0qFp0xFUAtSObqYynIgWpQ0=",
"_location": "/speedometer",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "speedometer@~0.1.2",
"name": "speedometer",
"escapedName": "speedometer",
"rawSpec": "~0.1.2",
"saveSpec": null,
"fetchSpec": "~0.1.2"
},
"_requiredBy": [
"/progress-stream"
],
"_resolved": "https://registry.npmjs.org/speedometer/-/speedometer-0.1.4.tgz",
"_shasum": "9876dbd2a169d3115402d48e6ea6329c8816a50d",
"_spec": "speedometer@~0.1.2",
"_where": "E:\\projects\\p\\gitlit\\app\\node_modules\\progress-stream",
"author": {
"name": "Mathias Buus Madsen",
"email": "mathiasbuus@gmail.com"
},
"bugs": {
"url": "https://github.com/mafintosh/speedometer/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "simple speed measurement in javascript",
"homepage": "https://github.com/mafintosh/speedometer#readme",
"keywords": [
"speed",
"bytes",
"per",
"second",
"transfer"
],
"name": "speedometer",
"repository": {
"type": "git",
"url": "git://github.com/mafintosh/speedometer.git"
},
"version": "0.1.4"
}