Skip to content

Instantly share code, notes, and snippets.

View CelticParser's full-sized avatar
😝

Jason Alan Kennedy CelticParser

😝
View GitHub Profile
// Node.js CheatSheet.
// Download the Node.js source code or a pre-built installer for your platform, and start developing today.
// Download: http://nodejs.org/download/
// More: http://nodejs.org/api/all.html
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@CelticParser
CelticParser / npm-vulnerability-audit.sh
Created October 22, 2015 23:50
Check for vulnerabilities in npm shrinkwrap-package dependencies
task_security() {
# Reference: http://blog.nodesecurity.io/2014/02/01/new-feature-validate-modules-with-npm-shrinkwrap
if [ ! -f 'npm-shrinkwrap.json' ]; then
echo -e "\n\e[40mAudit: \e[101m[FAIL]\e[0;49;93;1m Create npm-shrinkwrap.json by running: \e[0m\n
$ npmflat --production\n"
exit 1;
fi
@CelticParser
CelticParser / GetPackageName.js
Created October 8, 2015 15:44
Git NPM package.json Name
var pjason = require('./package.json');
console.log(pjson.name);
@CelticParser
CelticParser / upstream.md
Created September 29, 2015 20:58
How to Update a GitHub Forked Repository

How to Update a GitHub Forked Repository

In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:

# Add the remote, call it "upstream":

git remote add upstream https://github.com/whoever/whatever.git

# Fetch all the branches of that remote into remote-tracking branches,
@CelticParser
CelticParser / .travis.yml
Created September 14, 2015 20:07
Travis File Template for StaticSmith Modules
language: node_js
node_js:
- "0.10"
- "0.12"
- "iojs"
@CelticParser
CelticParser / .npmignore
Last active September 14, 2015 20:05
.npmignore Template for StaticSmith Modules
node_modules
test
.c9
@CelticParser
CelticParser / .jshintrc
Created September 14, 2015 20:01
.jshintrc Template for StaticSmith Modules
{
"undef": false,
"esnext": true,
"laxbreak": true,
"laxcomma": true,
"indent": 2
}
@CelticParser
CelticParser / .gitignore
Created September 14, 2015 20:00
.gitignore template for StaticSmith Modules
node_modules
npm-debug.log
.c9
@CelticParser
CelticParser / .gitattributes
Last active September 14, 2015 19:58
.gitattributes template for StaticSmith Modules
# Ignore un-needed files and directories for export of production releases
# See: http://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes#Exporting-Your-Repository
test/ export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.jshintrc export-ignore
.npmignore export-ignore
.npm-debug.log export-ignore
.travis.yml export-ignore