// Run docker image in interactive mode
docker run -it <image name>:<image tag>
// Run docker image in interactive mode with host port 8080 mapped to container port 80
docker run -it -p 8080:80 <image name>:<image tag>
// Run docker with the 3001 port exposed,
docker run -it --expose=3001 <image name>:<image tag>
This file contains hidden or 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
$PATH_TO_PROVISIONING_PROFILE = "" | |
$DEVELOPER_TEAM_ID = "" | |
xcodebuild PROVISIONING_PROFILE="$PATH_TO_PROVISIONING_PROFILE" CODE_SIGN_IDENTITY="$DEVELOPER_TEAM_ID" |
This file contains hidden or 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
(function () { | |
'use strict'; | |
try { | |
undefined(); | |
} catch (err) { | |
var a = 5; | |
console.log(a); // 5 | |
console.log(err); // TypeError: undefined is not a function(…) | |
} |
This file contains hidden or 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
function enclosingScope () { | |
var b; | |
function inner (def) { | |
def(); | |
} | |
var a = 2; | |
} | |
// After hoisting due to compilation, the above changes to |
This file contains hidden or 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
/** | |
* A pure function to find key from object, matching a predicate | |
* similar to https://lodash.com/docs/4.17.4#findKey or Array.findIndex() | |
* @param {Object} obj: The object to find the specified key from | |
* @param {Function} fn: The predicate function | |
*/ | |
const findKey = (obj, fn) => Object.keys(obj).find(k => fn(obj[k])); | |
//Test code |
This file contains hidden or 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
function forEach(arr, callback, start=0) { | |
if (0 < start && start < arr.length) { | |
callback(arr[start], start, arr); | |
return forEach(arr, callback, start + 1); | |
} | |
} |
-
Node.js, TC-39, and Modules: https://hackernoon.com/node-js-tc-39-and-modules-a1118aecf95e
-
defense-of-dot-js/proposal.md: https://github.com/dherman/defense-of-dot-js/blob/master/proposal.md
RSS-heapUsed-heapAllocated memory in Node: https://www.dynatrace.com/blog/understanding-garbage-collection-and-hunting-memory-leaks-in-node-js/ V8 Garbage collection: http://jayconrod.com/posts/55/a-tour-of-v8-garbage-collection
- Canary Deployments: Route a subset of users to new version as part of CD process. We can leverage it for AB test and Perf testing. As an advanatge we already have RC environment. We can make it default for internal live/ combine it with Octopus-Skipper setup to put very small weights of live users and create monitors to measure exact targeted KPIs Depending on the KPI numbers we can either make it live version or roll it back. This will allow faster deployment cycle with better quality and confidence We can use the information about rollout or rollbacks as a feedback to improve the process in future https://www.infoq.com/news/2013/03/canary-release-improve-quality
OlderNewer