Skip to content

Instantly share code, notes, and snippets.

View anantpatil's full-sized avatar

Anant Patil anantpatil

  • VMware
  • Bangalore
View GitHub Profile
@anantpatil
anantpatil / tmux.conf
Created April 16, 2012 09:03
My tmux configuration
# Settings courtesy internet
# Bind C-a (Ctrl+a) to default action on tmux
set-option -g prefix C-a
unbind C-b
# Command sequence for nested tmux when running tmux inside another tmux, you
# need to send command to inner tmux
bind-key a send-prefix
The interlock at github.com/anantpatil/interlock/tree/avi-extn
integrates Avi with Docker UCP.
To use interlock, perform following steps:
0. Pre-requisites:
a. UCP version 2.1 or above
b. Docker version 1.13 or above
c. docker-compose 1.11 or above
@anantpatil
anantpatil / .zshrc
Created March 20, 2013 06:19
.zshrc
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
bindkey -v
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/home/patilana/.zshrc'
autoload -Uz compinit
@anantpatil
anantpatil / .vimrc
Last active December 15, 2015 04:38
vimrc file.
" set soft wrap, automatic line break
" show breaks in like with ...
" set nolist as it messes up with linebreak
syntax on
set wrap lbr nolist showbreak=…
"set sw=4 "Use this when coding python
set sw=4
set ai wm=5 sm
set smarttab
set smartindent
@anantpatil
anantpatil / preparecommit
Created March 20, 2013 06:13
A script to help commit changes from repository. When run on local workspace, it creates a .commit.sh file which contains all the file that needs to be committed and creates .comments.txt which has comments logged into it. Commit script (.commit.sh) has reference to comments file. After you run this script, review the changes in .commit.sh and c…
#!/usr/bin/env bash
# A script to select added/modified files from working copy and commit
# them. Before commiting, takes the comments as well.
# TODO: Commit to svn repository? May be not, just to review and commit
# later whenever you want.
commit_script=.commit.sh
comments_file=.comments.txt
@anantpatil
anantpatil / makecl
Created March 20, 2013 06:09
A script to help create a subversion change-list.
#!/usr/bin/env bash
cl=$1
if [ "$cl" = "" ];then
echo "CL name not specified."
exit 1
fi
svn st |
@anantpatil
anantpatil / svndiff
Created January 31, 2013 08:46
Colored svn diff command. When using a "svn diff", its easy to see the differences based on color instead of based on + or - symbol in the beginning of the line. Usage: $svndiff <file name>
#!/bin/sh
# Output colored text
# Color the contents of working copy green and old copy red.
svn diff $* | sed -e 's/^+/\x1b\[32m+/;s/^-/\x1b[31m-/;s/$/\x1b[0m/';
@anantpatil
anantpatil / showdiffs
Last active December 12, 2015 00:08
A script to cycle through all the modified files in subversion repository to see the diffs in gvim. Tested with subversion 1.6. Depending on the version of subversion, you may need to modify cut command to get the exact file name.
#!/usr/bin/env bash
# Author: Anant Patil (anant.techie@gmail.com)
#
# Make a list of all the modified files in local subversion repository
# in current directory. Cycle throuh all the files and ask if you want
# to see the diff.
#
# Uses svnvimdiff command created by Geoff Buchan which can be found at
# https://github.com/vim-scripts/svnvimdiff/blob/master/svnvimdiff
@anantpatil
anantpatil / config-main.cfg
Created January 21, 2015 06:45
main config for IDLE. Keep this and config-highlight.cfg in ~/.idlerc/
[Theme]
name = desert
default = 0
[EditorWindow]
font = source code pro
font-size = 9
@anantpatil
anantpatil / config-highlight.cfg
Created January 21, 2015 06:43
config-highlight for IDLE with solarized dark, light and desert colorscheme
[Solarized Dark]
normal-foreground = #839496
normal-background = #002b36
keyword-foreground = #859900
keyword-background = #002b36
builtin-foreground = #b58900
builtin-background = #002b36
comment-foreground = #586e75
comment-background = #002b36
string-foreground = #2aa198