Skip to content

Instantly share code, notes, and snippets.

View sajidali's full-sized avatar
✍️

Sajid Ali Mudassar sajidali

✍️
View GitHub Profile
@gayanvirajith
gayanvirajith / formatArrayIntoComma.js
Created July 23, 2015 11:14
Join the elements in an javascript array, but let the last separator be different eg: `and` / `or`
/*
* Join the elements in an javascript array,
* but let the last separator be different eg: `and` / `or`
* Stackoverflow link: http://stackoverflow.com/questions/15069587/is-there-a-way-to-join-the-elements-in-an-js-array-but-let-the-last-separator-b
* Credit: Chris Barr - http://stackoverflow.com/users/79677/chris-barr
*/
function formatArray(arr){
var outStr = "";
if (arr.length === 1) {
outStr = arr[0];
@SergeyMiracle
SergeyMiracle / nginx_auto_start.sh
Created January 13, 2017 04:42 — forked from aymanosman/nginx_auto_start.sh
Nginx: Start nginx on boot on Mac
# brew install nginx
sudo ln -s /usr/local/opt/nginx/homebrew.mxcl.nginx.plist /Library/LaunchDaemons/
sudo chown root:wheel /usr/local/opt/nginx/homebrew.mxcl.nginx.plist
sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.nginx.plist
# Why do you need sudo?
# If you want nginx to be able to bind to port 80, it will need superuser privileges
@zpalexander
zpalexander / .bash_profile
Created April 15, 2017 18:50
Bash Profile
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
export NVM_DIR="$HOME/.nvm"
. "$(brew --prefix nvm)/nvm.sh"
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases