Skip to content

Instantly share code, notes, and snippets.

View erabhimanyu's full-sized avatar
🍁
Perceive. Grow. Disrupt

Abhimanyu Arora erabhimanyu

🍁
Perceive. Grow. Disrupt
View GitHub Profile

Node postmortem debugging (OSX)

1. Taking core dump

To get core dump of running node process:

  • Take PID of that process:
    pgrep -lf node
@erabhimanyu
erabhimanyu / v8-gc-Command-line-node
Created May 19, 2019 13:10
Command line option for node to explore V8 GC
--expose_gc (expose gc extension)
type: bool default: false
--max_new_space_size (max size of the new generation (in kBytes))
type: int default: 0
--max_old_space_size (max size of the old generation (in Mbytes))
type: int default: 0
--max_executable_size (max size of executable memory (in Mbytes))
type: int default: 0
--gc_global (always perform global GCs)
type: bool default: false
@erabhimanyu
erabhimanyu / React-component-stateless
Created December 4, 2016 13:47
A starter gist for creating a stateless react component
import React, {Component} from 'react';
import styles from './Name`.scss';
const Name = () => ();
Name.defaultProps = {};
Name.propTypes = {};
export default Name;
@erabhimanyu
erabhimanyu / React-Component
Created December 4, 2016 11:21
A starter gist for creating a react component
import React, {Component} from 'react';
import styles from './Name.scss';
class Name extends Component {
constructor(props) {
super(props);
this.state = {};
}
render() {
@erabhimanyu
erabhimanyu / gist:be5fd1fece8d4fd173362025500c808c
Created August 21, 2016 09:38
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after