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
@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 / 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 / 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 / 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 / .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 / .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 / putty.bat
Created May 11, 2014 04:49
putty.bat
@echo OFF
start putty.exe -load "Solarized Dark" -ssh %*
exit
How to setup:
----
On Ubuntu, download the devstack from
$ git clone https://github.com/openstack-dev/devstack.git devstack
and create the stack user by running the command as root. This is
important.
$ sudo su
$ devstac/tools/create-stack-user.sh
$ exit
[[local|localrc]]
DATABASE_PASSWORD=stackdb
ADMIN_PASSWORD=nomoresecrete
SERVICE_PASSWORD=$ADMIN_PASSWORD
# openssl rand -hex 10
SERVICE_TOKEN=thequickbrownfox
RABBIT_PASSWORD=stackqueue
#DEST=/home/passwordlessuserondebian