Skip to content

Instantly share code, notes, and snippets.

View bschandramohan's full-sized avatar

Chandra Mohan bschandramohan

View GitHub Profile
@bschandramohan
bschandramohan / Stack.js
Created June 16, 2014 18:04
Implementation of a Stack in JS
/**
* Implementation of a Stack in Javascript
* @constructor
* @author Chandra Mohan
*/
function Stack() {
/**
* Element to store data. _ is used to imply that clients should not modify it.
* @type {Array}
* @private
@bschandramohan
bschandramohan / Queue.js
Created June 16, 2014 18:17
Queue implementation in javascript
/**
* Queue Implementation in Javascript
* @param name
* @constructor
*/
function Queue(name) {
/**
* Name to just indicate the name of the current instance. Just for debugging purpose and doesn't have any effect
* on the working of the Queue.
* NOTE: Feel free to not pass this parameter.
@bschandramohan
bschandramohan / Bash.sh
Created October 22, 2018 19:56
Shell command to open git project in browser from terminal
# Running this in the main directory of a git repo, this command opens up the git project in browser
open "$(grep "url" .git/config | cut -d" " -f3)"