Skip to content

Instantly share code, notes, and snippets.

View suhas-karanth's full-sized avatar

Suhas Karanth suhas-karanth

  • Bengaluru, India
View GitHub Profile
@suhas-karanth
suhas-karanth / node_pm2_update.md
Last active March 28, 2024 00:42
Upgrading node and pm2 using nvm

Update node using nvm

nvm install 6.3
nvm alias default 6.3
nvm use 6.3

Install and Update pm2

npm install pm2@latest -g ; pm2 update
@suhas-karanth
suhas-karanth / .eslintrc.json
Last active July 31, 2016 10:24
My Eslint configuration for node v6.3
{
"env": {
"es6": true,
"node": true,
"builtin": true
},
"parserOptions": {
"ecmaVersion": 6,
"ecmaFeatures": {
"arrowFunctions": true,
@suhas-karanth
suhas-karanth / Usage.md
Last active July 31, 2016 11:21
Eslint validation with pre-commit

The test script and pre-commit-eslint.sh are triggered before commit. If there are any eslint validation errors or if any unit test fails, commit will fail:

suhas:~/workspace/node-dogstatsd$ git commit

Validating Javascript with eslint:

/home/suhas/workspace/node-dogstatsd/lib/statsd.js
  30:9  error  'x' is defined but never used  no-unused-vars
@suhas-karanth
suhas-karanth / API.md
Last active August 23, 2016 05:28 — forked from iros/API.md
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@suhas-karanth
suhas-karanth / migration.md
Last active August 28, 2016 05:23
Home folder migration Ubuntu

Ubuntu home folder migration

Setting up a system takes time and effort. It would be ideal if we could port our settings to the new system.

tar has the capability to preserve permissions for folders and files. We can use the following commands to package the contents of the home folder and unpack it in the new ubuntu system be using the following commands:

tar cpf ~/home.tar ~