Skip to content

Instantly share code, notes, and snippets.

@vineeshnp
vineeshnp / tmux-cheatsheet.markdown
Created December 7, 2018 17:16 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@vineeshnp
vineeshnp / meetup.md
Last active July 24, 2018 11:58
JS Meetup #23: Outline

Game backend from scratch using NodeJS

Click here to register!

Prerequisite

  • Fundamental's of NodeJS.
  • Basic understanding of eventloop.
  • Basics of ES6.
  • Working of REST api's.
  • How to play CHESS game.
@vineeshnp
vineeshnp / sub-array.js
Created November 14, 2017 16:42
Prints all sub array of an array - Bruteforce
/**
* Creates all the sub arrays of a give array
* @params {Array} arr
* @returns {Array}
*/
function getSubArray(arr){
let arrLen = arr.length;
let result = [];
for(let subLen = degree; subLen <= arrLen; subLen++){
for(let begin = 0; begin+subLen <=arrLen; begin++){
@vineeshnp
vineeshnp / server.js
Created November 14, 2017 16:36
A simple express server.
const express = require('express')
const app = express()
app.get('/', (req, res) => res.send('Hello World!'))
app.listen(3000, () => console.log('Example app listening on port 3000!'))
@vineeshnp
vineeshnp / palindromes.js
Created November 12, 2017 17:16
Check palindrome in JS
/**
* Function returns true if string is palendrome
* @params {String} str
* @returns {Boolean}
*/
function pal(str){
return str === str.split('').reverse().join('');
}
@vineeshnp
vineeshnp / sum-array.js
Created November 12, 2017 16:57
Sum of an array in Javascript
const arr = [1, 2, 4, 5, -3]
var sum = arr.reduce((a, b) => a + b, 0);