Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
| Commit type | Emoji |
|---|---|
| Initial commit | π :tada: |
| Version tag | π :bookmark: |
| New feature | β¨ :sparkles: |
| Bugfix | π :bug: |
| (/[A-z\u00C0-\u00ff]+/g) |
| module.exports = { | |
| 'HOSTPATH': 'http://your.host.here', | |
| 'PORT': 80, | |
| 'EXPRESS_SESSION_SECRET': '123456', | |
| 'TWITTER_CONSUMER_KEY': 'your-consumer-key-here', | |
| 'TWITTER_CONSUMER_SECRET': 'your-secret-here', | |
| 'GOOGLE_APP_ID': 'your-app-id-here', | |
| 'GOOGLE_CONSUMER_SECRET': 'your-consumer-secret-here', | |
| }; |
| /* ******************************************************************************************* | |
| * THE UPDATED VERSION IS AVAILABLE AT | |
| * https://github.com/LeCoupa/awesome-cheatsheets | |
| * ******************************************************************************************* */ | |
| // 0. Synopsis. | |
| // http://nodejs.org/api/synopsis.html |
| [alias] | |
| recent = "!git for-each-ref --sort=-committerdate refs/heads/ --format='%(committerdate:short) %(refname:short)' | head -n 10" | |
| co = checkout | |
| cob = checkout -b | |
| coo = !git fetch && git checkout | |
| br = branch | |
| brd = branch -d | |
| brD = branch -D | |
| merged = branch --merged | |
| st = status |
| # remove .DS_Store file from GitHub that MAC OS X creates | |
| # find and remove .DS_Store | |
| find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch | |
| # create .gitignore file, if needed | |
| touch .gitignore | |
| echo .DS_Store > .gitignore | |
| # push changes to GitHub |
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
| Commit type | Emoji |
|---|---|
| Initial commit | π :tada: |
| Version tag | π :bookmark: |
| New feature | β¨ :sparkles: |
| Bugfix | π :bug: |
| function weightedMean(arrValues, arrWeights) { | |
| var result = arrValues.map(function (value, i) { | |
| var weight = arrWeights[i]; | |
| var sum = value * weight; | |
| return [sum, weight]; | |
| }).reduce(function (p, c) { |
| There is no way to store an empty object/array/null value. | |
| There are also no actual arrays. Array values get stored as objects with integer keys. | |
| (If all keys are integers, it will be returned as an array.) | |
| Basically, it's one giant tree of hashes with string keys. | |
| Simply write a value to any location, and the intermediary locations will automatically come into existance. | |
| ββ Classes ββ | |
| DataSnapshot : Container for a subtree of data at a particular location. |
| var express = require('express'); | |
| var app = express(); | |
| // response header for sever-sent events | |
| const SSE_RESPONSE_HEADER = { | |
| 'Connection': 'keep-alive', | |
| 'Content-Type': 'text/event-stream', | |
| 'Cache-Control': 'no-cache', | |
| 'X-Accel-Buffering': 'no' | |
| }; |