Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View happysundar's full-sized avatar

Sundar Rajagopalan happysundar

View GitHub Profile
@happysundar
happysundar / .bash_profile
Created August 8, 2013 01:13
my bash profile.
PS1="[\[\033[32m\]\w]\[\033[0m\]\n\[\033[1;36m\]\u@\h\a\[\033[1;33m\]-> \[\033[0m\]"
export SVN_EDITOR=vim
alias vm="ssh sundar@sundar-linux.melodis.com"
alias phpunit="phpunit --colors"
alias port="sudo port"
alias flushdns="dscacheutil -flushcache"
#alias vim='~/svim'
@happysundar
happysundar / pythonz and python_burrito.md
Created August 8, 2013 02:27
useful virtualenv/virtualenvwrapper commands

Use https://github.com/saghul/pythonz to install different versions of python

To install virtualenv, virtualenvwrapper et all natively (i.e, on the python "system" path of the machine), do a :

curl -s https://raw.github.com/brainsik/virtualenv-burrito/master/virtualenv-burrito.sh | $SHELL
mkvirtualenv -p ~/.pythonz/pythons/CPython-2.7.5/bin/python ~/VEnvs/MyProject
mkvirtualenv -p ~/.pythonz/pythons/CPython-2.7.5/bin/python -a ~/Rovi -r ./requirements.txt rovi
@happysundar
happysundar / pyspatialite_install_instructions.md
Last active December 27, 2016 08:12
how to install pyspatialite

Install prerequisite package dependencies

From http://elgis.argeo.org/repos/6/, find the latest repo rpm, and install it as root:

`sudo rpm -Uvh http://elgis.argeo.org/repos/6/elgis-release-6-6_0.noarch.rpm`

Install Dependency Packages:


  1. yum install python-devel (needed by Shapely to compile C extensions)
@happysundar
happysundar / setup port forwarding to enable remote debugging in vagrant vm.md
Created January 30, 2014 07:36
Getting the remote debugger to work with a java process running in a vagrant vm

Vagrant vm network config

In the Vagrantfile, do :

  # Create a public network, which generally matched to bridged network.
  # Bridged networks make the machine appear as another physical device on
  # your network.
  config.vm.network :public_network
@happysundar
happysundar / java_and_spatialite.md
Created January 31, 2014 19:34
How to get Java and Spatialite working on a base Centos 6 box

Up and Running with Java and libspatialite : a from-the-scratch how-to

All instructions/links/version are valid as of Jan 29, 2014

Here is how I got up-and running with the Xerial JDBC driver and libspatialite on a Centos 6 x86_64 box.

Getting the “Native Libraries” (sqlite3/libspatialite)

Installing required YUM Repositories

# tmux config
# General {{{
set -g prefix `
unbind ^b
# Ring the bell if any background window rang a bell.
set -g bell-action any
@happysundar
happysundar / vagrant_commands.md
Created January 31, 2014 20:43
useful vagrant commands

Install vagrant-vbguest plugin

This installs the plugin that automatically upgrades the virtual machine’s vbox guest additions to match the virtual box version installed on the host machine:

vagrant plugin install vagrant-vbguest 

Here is how you get a basic Centos 6 box:

vagrant box add centos http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4-x86_64-v20130731.box
@happysundar
happysundar / maven commands.md
Created February 1, 2014 03:52
useful maven commands

Remote debug a test started with maven

This is useful when there are a lot of libraries that are included properly during a maven package..(i.e, in any real project!)

mvn -Dmaven.surefire.debug="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=4044 -Xnoagent -Djava.compiler=NONE" -Dtest=GeoLocatorTest test

Display the classpath containing all dependencies and transitive dependencies

mvn dependency:build-classpath package

@happysundar
happysundar / mvn_failsafe_plugin.md
Created February 3, 2014 22:28
maven integration tests

Dividing tests into unit-test and integration-test in mave

We use the "failsafe" plugin in maven to run and manage integration tests.

Usually, when you build your project, you want to skip running the integration/regression tests;

So, you 'exclude' them from the usual 'test' phase by adding this (in the xpath /pom:project/pom:build/pom:plugins/pom:plugin) in your pom.xml:

 
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.