Skip to content

Instantly share code, notes, and snippets.

View govindpatel's full-sized avatar

Govind H Patel govindpatel

View GitHub Profile
@govindpatel
govindpatel / VIM and other stuffs
Last active July 2, 2018 21:10
Setting up mac
http://sourabhbajaj.com/mac-setup/Vim/README.html
http://www.viemu.com/vi-vim-cheat-sheet.gif
"vim awesome"
@govindpatel
govindpatel / Main.java
Last active April 18, 2017 08:11
Document Structure and program for Luwak (Not working yet)
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.search.*;
import uk.co.flax.luwak.*;
import uk.co.flax.luwak.matchers.SimpleMatcher;
import uk.co.flax.luwak.presearcher.TermFilteredPresearcher;
import uk.co.flax.luwak.queryparsers.LuceneQueryParser;
import java.util.ArrayList;
import java.util.List;
@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/

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@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
{
"key": 500613,
"doc_count": 10
},
{
"key": 500383,
"doc_count": 8
},
{
"key": 502181,
@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

@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 / 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.