Skip to content

Instantly share code, notes, and snippets.

View nishant8BITS's full-sized avatar
🎯
Focusing

Nishant Kumar nishant8BITS

🎯
Focusing
View GitHub Profile
##
# Creates an alias called "git hist" that outputs a nicely formatted git log.
# Usage is just like "git log"
# Examples:
# git hist
# git hist -5
# git hist <branch_name>
# git hist <tag_name> -10
##
git config --global alias.hist "log --pretty=format:'%C(yellow)[%ad]%C(reset) %C(green)[%h]%C(reset) | %C(red)%s %C(bold red){{%an}}%C(reset) %C(blue)%d%C(reset)' --graph --date=short"

XCode

  • Install XCode from App Store.
  • Open XCode and agree to terms and conditions.

XCode CLI Tools

  • xcode-select --install

Install Homebrew

@nishant8BITS
nishant8BITS / LICENSE
Last active August 29, 2015 14:27 — forked from ourmaninamsterdam/LICENSE
Arrayzing - The JavaScript array cheatsheet
The MIT License (MIT)
Copyright (c) 2015 Justin Perry
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
@nishant8BITS
nishant8BITS / ver36.js
Created October 26, 2015 16:57 — forked from mwgamera/ver36.js
Alphanumeric derivative of Verhoeff check digit in javascript.
var Ver36 = function() {
"use strict";
var N = 18, N2 = N*2;
var d18_op; // D18 group operation table
var d18_inv; // D18 group inverse
var perm; // the permutation decomposed into cycles
var a2i,i2a; // ASCII translation tables
var NA=0xff; // invalid digit marker in ASCII table
// initialization code
@nishant8BITS
nishant8BITS / q.md
Created December 5, 2015 13:37 — forked from SinisterMinister/q.md
JS Interview questions

Javascript Interview Questions

General interview questions for a front-end JS developer.

Questions

  • What is the spec Javascript implements and what versions of it are you most current with?

  • Does JavaScript support the use of classes?

@nishant8BITS
nishant8BITS / Social RESTful URLs snippet.md
Created December 8, 2015 20:47 — forked from dr-dimitru/Social RESTful URLs snippet.md
Social links, +1s and shares using only HTML (no JS)
@nishant8BITS
nishant8BITS / js-error-logging-services.md
Created January 17, 2016 05:01 — forked from cheeaun/js-error-logging-services.md
JavaScript error logging services
@nishant8BITS
nishant8BITS / elasticsearch-mongo-install.md
Created June 5, 2016 19:13 — forked from lepfhty/elasticsearch-mongo-install.md
Install Elasticsearch and MongoDB with river on Mac OSX.

Install Elasticsearch with Service Wrapper

# This code snippet is runnable

# Download Elasticsearch zip
curl -O https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.7.zip

# Unzip to desired location
unzip elasticsearch-0.90.7.zip -d $HOME
@nishant8BITS
nishant8BITS / promises-faq.md
Created May 28, 2017 04:16 — forked from vasanthk/promises-faq.md
The Promises FAQ - addressing the most common questions and misconceptions about Promises.

Broken Promises

Technical Decision

Eliminate all promises from application.

TL;DR

The Promise API is the source of many confusing errors in our application, using node style callbacks eliminates the issue without reducing code quality.