Skip to content

Instantly share code, notes, and snippets.

View manichandra's full-sized avatar

Manichandra manichandra

View GitHub Profile
@manichandra
manichandra / localStorageMock.ts
Created May 4, 2020 15:48 — forked from wzr1337/localStorageMock.ts
Mock localStorage for jasmine tests in TypeScript. This is the testing script. Copy the parts between snip and snap to mock your localStorage
/// <reference path="../../library.test.d.ts"/>
import * as angular from "angular"; angular;
import * as mocks from "angular-mocks/ngMock"; mocks;
describe('feat(localStorage Mock): ', function() {
beforeAll(() => {
angular.module('mock-module',[])
});
@manichandra
manichandra / terminal-git-branch-name.md
Created January 24, 2020 03:57 — forked from joseluisq/terminal-git-branch-name.md
Add Git Branch Name to Terminal Prompt (Mac)

Add Git Branch Name to Terminal Prompt (Mac)

image

Open ~/.bash_profile in your favorite editor and add the following content to the bottom.

# Git branch in prompt.

parse_git_branch() {
@manichandra
manichandra / console-polyfill.js
Created June 21, 2019 14:46 — forked from cookiengineer/console-polyfill.js
A better console API for node.js, with support for all data types and pretty-printing using shell color codes
(function() {
let _std_out = '';
let _std_err = '';
/*
* HELPERS
@manichandra
manichandra / object-equal.md
Created March 8, 2018 15:48 — forked from MSAJJAN-EEOC/object-equal.md
Check if two arrays or objects are equal with JavaScript

What we need to compare

You could have a simple array, like this one.

var arr = [1, 2, 3, 4, 5];

Or, you could have a complex, multidimensional array with various types of inputs.

var arr = [1, 'something', 3, {
	item1: 42,
	item2: 'another thing',

item3: function () {

@manichandra
manichandra / multiple_ssh_setting.md
Created March 8, 2018 15:36 — forked from MSAJJAN-EEOC/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@manichandra
manichandra / multiple_ssh_setting.md
Created August 29, 2017 21:56 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"