Skip to content

Instantly share code, notes, and snippets.

Makesh Kumar Karpagavinayagam Makesh

Block or report user

Report or block Makesh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
export PGPASSWORD=password
/Library/PostgreSQL/9.4/bin/psql -U postgres -f /Users/makesh/Documents/Workspace/medex/database/dbdrop.sql
echo "re-create database .. "
/Library/PostgreSQL/9.4/bin/psql -U postgres -f /Users/makesh/Documents/Workspace/medex/database/dbcreate.sql
echo "run dll database .. "
/Library/PostgreSQL/9.4/bin/psql -U postgres -d medx -f /Users/makesh/Documents/Workspace/medex/database/ddl.sql
echo "re-create procedures in database .. "
/Library/PostgreSQL/9.4/bin/psql -U postgres -d medx -f /Users/makesh/Documents/Workspace/medex/database/procedure.sql
View Increment counter in lambda functions
------------------ Pre Java 8 ---------------------
Map<Employee, File> fileMap = new HashMap<Employee, File>();
int i =0;
for (Map.Entry<Employee, File> entry : map.entrySet()) {
// do something with i
------------------ Java 8 Lambda ---------------------
AtomicInteger counter = new AtomicInteger(0);
View source-1.8
View start tomcat in debug mode
echo 'Starting tomcat'
export JPDA_ADDRESS=8000
export JPDA_TRANSPORT=dt_socket
/Users/xyz/Documents/Tools/apache-tomcat-8.0.15/bin/ jpda start
View gist:406c56bd064024a84e09
String jsonContent = null;
String url = '/Users/makesh/temp/temp.json'
try {
jsonContent = new String(Files.readAllBytes(Paths.get(url)));
} catch (IOException e) {
View gist:2631338
public Car[] getCars() {
Makesh / gist:2503421
Created Apr 26, 2012
convert eclipse project into Android project
View gist:2503421
<?xml version="1.0" encoding="UTF-8"?>
You can’t perform that action at this time.