Please use semver-utils instead!
npm install semver-utils
See the README for semver-utils at https://github.com/coolaj86/semver-utils
npm install semver-utils
| var http = require("http"), | |
| url = require("url"), | |
| path = require("path"), | |
| fs = require("fs") | |
| port = process.argv[2] || 8888; | |
| http.createServer(function(request, response) { | |
| var uri = url.parse(request.url).pathname | |
| , filename = path.join(process.cwd(), uri); |
| var fs = require('fs') | |
| , path = require('path') | |
| , _ = require('underscore'); | |
| var rootPath = "/path/to/remove"; | |
| removeDirForce(rootPath); | |
| // path should have trailing slash | |
| function removeDirForce(dirPath) { | |
| fs.readdir(dirPath, function(err, files) { |
| exports.ext = function () { | |
| var extTypes = { | |
| "3gp" : "video/3gpp" | |
| , "a" : "application/octet-stream" | |
| , "ai" : "application/postscript" | |
| , "aif" : "audio/x-aiff" | |
| , "aiff" : "audio/x-aiff" | |
| , "asc" : "application/pgp-signature" | |
| , "asf" : "video/x-ms-asf" | |
| , "asm" : "text/x-asm" |
| /* | |
| * Dependencies: Apache POI Library from http://poi.apache.org/ | |
| */ | |
| package poi_excels; | |
| import java.io.FileInputStream; | |
| import java.io.FileNotFoundException; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.util.logging.Level; |
| The MIT License (MIT) | |
| Copyright (c) 2016 Stuart Powers | |
| 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: |
| urlencode() { | |
| # urlencode <string> | |
| old_lc_collate=$LC_COLLATE | |
| LC_COLLATE=C | |
| local length="${#1}" | |
| for (( i = 0; i < length; i++ )); do | |
| local c="${1:$i:1}" | |
| case $c in |
npm install semver-utils
See the README for semver-utils at https://github.com/coolaj86/semver-utils
npm install semver-utils
| #!/bin/bash | |
| # bash generate random alphanumeric string | |
| # | |
| # bash generate random 32 character alphanumeric string (upper and lowercase) and | |
| NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
| # bash generate random 32 character alphanumeric string (lowercase only) | |
| cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1 |
| function alertTerminal(){ | |
| console.log("\007"); | |
| } |
| #!/bin/bash | |
| # works with a file called VERSION in the current directory, | |
| # the contents of which should be a semantic version number | |
| # such as "1.2.3" | |
| # this script will display the current version, automatically | |
| # suggest a "minor" version update, and ask for input to use | |
| # the suggestion, or a newly entered value. |