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
/** | |
* Simple userland CPU profiler using v8-profiler | |
* Usage: require('[path_to]/CpuProfiler').init('datadir') | |
* | |
* @module CpuProfiler | |
* @type {exports} | |
*/ | |
var fs = require('fs'); | |
// v8-profiler-node8 is Based on v8-profiler-node8@5.7.0, Solved the v8-profiler segment fault error in node-v8.x. |
- Multi-stage builds are commonly used to keep build dependencies out of the final Docker image.
- The first stage imports the source tree, installs the build toolchain, and produces the build artifact.
- The second stage extracts the build artifact and copies it into a minimal base image. This is achieved using the COPY --frominstruction, which allows copying files from another image or build stage.
- You have created the private, public and virtual NPM repos and associated blob stores.
- Created a user with access to be able to read and publish to npm repo
- You have added a npm bearer token realm to be able to do publish. Publish requires user authentication and realm config on server. Note: The default realm that is applied is called the Local Authentication and Local Authorization realm. They allow the repository manager to manage security setup without additional external systems.
- No npmrc to begin with, If you have one then rename it before going ahead.
~/Documents/GIT/project/temp/tulsi-node on master! ⌚ 13:48:15
$ cat ~/.npmrc
cat: /Users/kiran/.npmrc: No such file or directory
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
Below are the Big O performance of common functions of different Java Collections. | |
List | Add | Remove | Get | Contains | Next | Data Structure | |
---------------------|------|--------|------|----------|------|--------------- | |
ArrayList | O(1) | O(n) | O(1) | O(n) | O(1) | Array | |
LinkedList | O(1) | O(1) | O(n) | O(n) | O(1) | Linked List | |
CopyOnWriteArrayList | O(n) | O(n) | O(1) | O(n) | O(1) | Array |
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
1. hostname - Before change | |
2. sudo hostnamectl set-hostname --static ip-xxx-xxx-xxx-xxx.us-east-2.compute.internal | |
3. Add "preserve_hostname: true" to /etc/cloud/cloud.cfg | |
4. Reboot | |
5. hostname - After change |
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
Procedure: | |
1. Expand EBS volume | |
2. Grow Partition - growpart | |
3. Physical Volume Resize - pvresize | |
4. Logical Volume Resize - lvresize | |
5. Resize File System - resize2fs | |
In this Example we have - 2 Disks, 1 VG, 2 PVs, 3 LVs and EXT4 Filesystem. For XFS use xfs_growfs instead of resize2fs | |
[root@ip-masked docker-compose-related]# pvs |
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
# For more information on configuration, see: | |
# * Official English Documentation: http://nginx.org/en/docs/ | |
# * Official Russian Documentation: http://nginx.org/ru/docs/ | |
##################################################################################################################### | |
########## For backend which is based on SNI - 3 options: | |
#1. Set HOST header with the actual domain name for the backend. | |
# OR | |
#2. Add the SNI lines below and HOST header (#1) not required in that case. | |
# OR |