Skip to content

Instantly share code, notes, and snippets.

View rahulshivsharan's full-sized avatar

Rahul Shivsharan rahulshivsharan

View GitHub Profile
@rahulshivsharan
rahulshivsharan / Steps.txt
Created July 20, 2016 07:31
MySql on Ubuntu
Installation
$ sudo apt-get install mysql-server
$ sudo apt-get install mysql-client
to check the status of mysql; whether it has started
$sudo netstat -tap | grep mysql
to start mysql
$ sudo /etc/init.d/mysql restart
curl ipecho.net/plain; echo
@rahulshivsharan
rahulshivsharan / .vimrc
Created May 2, 2016 12:42
.vimrc for using Vundle pluggin, to manage pluggins of vim
set t_Co=256
set nocompatible " required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
@rahulshivsharan
rahulshivsharan / Curl_POST.sh
Created September 2, 2015 07:12
Curl command for post request to REST services
curl -H "Content-Type: application/json" -X POST -d '{ "createlead" : { "last_name" : "Rahul Shivsharan", "subject" : "From Commandline", "email1" : "rahul.shivsharan@ril.com", "lead_source" : "Website", "phone_mobile" : "9867934525", "org_name" : "Reliance" } }' http://10.140.216.20:14280/il/crm/createLead
package sdf.common.sf;
import java.util.HashMap;
import java.util.Map;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
import org.hibernate.service.ServiceRegistry;
import org.hibernate.service.ServiceRegistryBuilder;
public enum HibernateCon {