Skip to content

Instantly share code, notes, and snippets.

View roygopal's full-sized avatar
💭
Always In Learning Mode

Gopal Roy roygopal

💭
Always In Learning Mode
  • India
View GitHub Profile
@roygopal
roygopal / gitcom.md
Created April 14, 2020 11:37 — forked from jednano/gitcom.md
Common git commands in a day-to-day workflow

Git Cheat Sheet

Initial Setup

Create an empty git repo or reinitialize an existing one

$ git init
@roygopal
roygopal / vanilla-js-cheatsheet.md
Created July 16, 2018 17:17 — forked from thegitfather/vanilla-js-cheatsheet.md
Vanilla JavaScript Quick Reference / Cheatsheet
// Description:
//
// One of the services provided by an operating system is memory management.
// The OS typically provides an API for allocating and releasing memory in a
// process's address space. A process should only read and write memory at
// addresses which have been allocated by the operating system. In this kata you
// will implement a simulation of a simple memory manager.
//
// JavaScript has no low level memory API, so for our simulation we will simply
// use an array as the process address space. The memory manager constructor
@roygopal
roygopal / find-appointment.js
Created June 10, 2017 08:30 — forked from coopermaruyama/find-appointment.js
Finding an Appointment (JS)
// The businesspeople among you will know that it's often not easy to find an
// appointment. In this kata we want to find such an appointment automatically.
// You will be given the calendars of our businessperson and a duration for the
// meeting. Your task is to find the earliest time, when every businessperson is
// free for at least that duration.
//
// Example Schedule:
//
// Person | Meetings
// -------+-----------------------------------------------------------
@roygopal
roygopal / regex.md
Last active May 27, 2017 06:00 — forked from vitorbritto/regex.md
Regex Cheat Sheet

Regular Expressions

Basic Syntax

  • /.../: Start and end regex delimiters
  • |: Alternation
  • (): Grouping

Definitely not comprehensive. This is meant to be a basic memory aid with links to get more details. I'll add to it over time.

Install

$ npm install mongoose --save

Connect

const mongoose = require('mongoose');