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
cmd_exists() { | |
command -v "$1" &> /dev/null | |
} | |
ncu-update-all(){ | |
if ! cmd_exists "ncu"; then | |
printf "ncu is required, please install it!\n" | |
exit 1 | |
fi |
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
cmd_exists() { | |
command -v "$1" &> /dev/null | |
} | |
ips(){ | |
local usage="ips [%NETWORK_BASE_IP%] [%BIT_DEPTH%] [ip-only | no-sudo]"$'\n'"Default IP: 192.168.1.0"$'\n'"Default Mask: 24" | |
local addr="$1"; | |
local mask="$2"; | |
local prefix=""; | |
local suffix=""; |
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
get-tunes(){ | |
local usage="get-tunes %PLAYLIST_OR_VIDEO_URL% [audio-only | video-only]"; | |
local url="$1"; | |
local option="$2"; | |
local prefix=""; | |
if [ -f "/usr/local/bin/youtube-dl" ]; then | |
prefix="/usr/local/bin/"; | |
fi | |
if [ -z "${url}" ]; then | |
echo "Problem fetching track: Track URL not supplied"; |
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
user nginx; | |
worker_processes 1; | |
error_log /var/log/nginx/error.log warn; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} |
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
/** | |
* Created by Fred Lackey on 11/16/16. | |
*/ | |
/* | |
Provides maximum flexibility when dealing with enums. | |
SCHEMA: | |
var schema = new mongoose.Schema({ | |
status : { type: String, enum: enums.TOKEN_STATUS.ids } |
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
var express = require('express'), | |
router = express.Router(); | |
router.use(init); | |
function init (req, res, next) { | |
req.appData = req.appData = {}; | |
next(); | |
} |
NewerOlder