A single point of failure (SPOF) is a part of a system that, if it fails, will stop the entire system from working.
source: wikipedia
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| #!/bin/sh | |
| if pgrep Dropbox > /dev/null; then | |
| osascript -e 'tell application "Dropbox" to quit' | |
| fi | |
| diskutil unmountDisk /dev/disk2 > /dev/null 2>&1 |
| var fs = require('fs'); | |
| var express = require('express'); | |
| var app = express(); | |
| var path = require('path'); | |
| app.get('/:site/:file', function(req, res, next){ | |
| var filePath = path.join(__dirname + '/sites' , req.params.site, req.params.file); | |
| if (fs.existsSync(filePath)){ | |
| res.sendfile(filePath); |
| #!/bin/sh | |
| ##3.5...10...15...20...25...30...35...40...45...50...55...60...65...70...75...80 | |
| ## | |
| ## Debian / Linux / Ubuntu / LSB | |
| ## Startup script for Express / Node.js application with the forever module | |
| ## | |
| ## | |
| ## A modification of "init.d.lsb.ex" by Nicolas Thouvenin | |
| ## | |
| ## |
| "use strict"; | |
| var https = require('https'); | |
| var fs = require('fs'); | |
| var auth = require('http-auth') | |
| var jsDAV = require("jsDav/lib/jsdav"); | |
| jsDAV.debugMode = false; | |
| var jsDAV_Locks_Backend_FS = require("jsDav/lib/DAV/plugins/locks/fs"); | |
| var basic = auth({ | |
| authRealm : "Private area.", |