-
Know the inode of the directory by ls -i command (lets say for example its X)
-
Know on which partition your directory is saved by df -T /path command ( lets say its on /dev/sda1 )
-
Now use this command : sudo debugfs -R 'stat ' /dev/sda1 You will see in the output :
-
crtime: 0x4e81cacc:966104fc -- mon Sep 27 14:38:28 2013
npm install --save socket.io
---------------------------------SERVER CODE START------------------------------------------
var express = require('express');
var app = express();
var server = http.createServer(app);
io = require("socket.io").listen(server);
server.listen(3000)
Shipit-cli - Command line utility to execute shipit scripts.
shipit-deploy - Npm to do actual code movement and publishing.
shipit-npm - Npm to install npms on servers during deployment.
shipit-shared - Npm to access symlinks file and directory on servers.
module.exports = function (shipit) {
require('shipit-deploy')(shipit);
require('shipit-shared')(shipit);
Put below code in .bashrc or .bash_profile. Close and start again all terminal or hit source ~/.bashrc to specific tab if you don't want to close terminal
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ "
One liner to stop / remove all of Docker containers:
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
Remove only stopped containers can be listed using:
docker rm $(docker ps -f "status=exited")
- save below code in nodejs_default_memory_check.js,
- execute it -
node nodejs_default_memory_check.js
. You can see this script fails and thats default RAM limit of NodeJS. Plz check screenshot in below comment. In Latest NodeJS versions default RAM is 4GB (still on the basis of your hardware and system OS, RAM will differ) - use max-old-space-size option if you want to increase memory limit. It accepts value in MB. In this example we are setting 8GB RAM
node --max-old-space-size=8192 nodejs_default_memory_check.js
function allocateMemory(size) {
// Simulate allocation of bytes
const numbers = size / 8;
const arr = [];
arr.length = numbers;
OlderNewer