Skip to content

Instantly share code, notes, and snippets.

View govindpatel's full-sized avatar

Govind H Patel govindpatel

View GitHub Profile

#Setting up Nginx on Your Local System ###by Keith Rosenberg

##Step 1 - Homebrew The first thing to do, if you're on a Mac, is to install homebrew from http://mxcl.github.io/homebrew/

The command to type into terminal to install homebrew is:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@govindpatel
govindpatel / Elasticsearch install and uninstall.txt
Last active September 9, 2021 04:35 — forked from jkubacki/gist:e2dd904bd648b0bd4554
Mac uninstall elasticsearch / install
#!/usr/bin/env sh
# checks to see if running
launchctl list | grep elasticsearch
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.elasticsearch.plist
launchctl remove homebrew.mxcl.elasticsearch
pkill -f elasticsearch
@govindpatel
govindpatel / django-script.sh
Created July 11, 2016 10:34
Create a django environment
#!/bin/bash
# this script will do the following
# create a folder by the name provided in argument1
# create a new virtualenv inside that folder
# activate the environment and using pip to install django
# start a django project by the name provided in argument2
# do the db migrate using python manage.py migrate
# and atlast, deactivate the environment
# to run this file use "sh django-script.sh outer-folder-name django-project-folder-name" command.
@govindpatel
govindpatel / Send to messenger error - pass through param
Last active February 19, 2019 11:30
Send to messenger button error - Possible pass through param values
Param ref must be a string of less than 150 characters. Allowed characters include alphanumeric characters and +-./:=_
possible values:
oneBigWord123
sample=pageId
key=value
@govindpatel
govindpatel / nginxproxy.md
Created August 19, 2016 05:16 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

{
"key": 500613,
"doc_count": 10
},
{
"key": 500383,
"doc_count": 8
},
{
"key": 502181,
@govindpatel
govindpatel / tmux-cheatsheet.markdown
Created November 23, 2016 19:39 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@govindpatel
govindpatel / Install_tmux
Created November 30, 2016 10:26 — forked from simme/Install_tmux
Install and configure tmux on Mac OS X
# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/