Skip to content

Instantly share code, notes, and snippets.

View vishwasbabu's full-sized avatar
🚀
Fired up !

Vishwas Babu A J vishwasbabu

🚀
Fired up !
View GitHub Profile
@vishwasbabu
vishwasbabu / IdeaShortcuts.txt
Last active July 3, 2019 07:00
Most commonly used shortcuts on Intellij Idea (Mac)
Introduce local variable : Command + option + V
Search All : Shift + Shift
Toggle line comment : Command + /
Run : Command + Shift + R
Refactor : Shift + Rename (touchpad)
Reformat selection : Option + Command + L
@vishwasbabu
vishwasbabu / CashFlowLive.sql
Created September 25, 2015 14:22
Light Cash Flow LIve
select a.cid centerId
,a.branch
,a.center
,a.loanOfficer
,a.dueDate
,sum(a.disbursementAmount) disbursementAmount
,sum(a.principalDue) principalDue
@vishwasbabu
vishwasbabu / CollectionSheetQuery.sql
Created September 25, 2015 14:21
Light Collection sheet Query
SELECT loandata.*
,ifnull(group_concat(c.name,':',convert(lc.amount,decimal(10,2)) separator ', '),'') fees
, SUM(ifnull(lc.amount_outstanding_derived,0)) AS chargesDue
#,ld.principal_amount_proposed
FROM
(
SELECT cn.display_name centerName
@vishwasbabu
vishwasbabu / createTenant.sql
Created September 6, 2015 12:04
Creating new Tenants on the demo server (with default data)
use `mifosplatform-tenants`;
INSERT INTO `tenant_server_connections` (`schema_name`) VALUES ('mifostenant-reference');
INSERT INTO `tenants` (`identifier`, `name`, `oltp_id`, `report_id`, `timezone_id`) VALUES ('reference', 'reference', ( select id from tenant_server_connections where schema_name="mifostenant-reference"), (select id from tenant_server_connections where schema_name="mifostenant-reference"), 'Asia/Kolkata');
create database `mifostenant-reference`;
use `mifostenant-reference`;
@vishwasbabu
vishwasbabu / clientDelete.sql
Last active September 17, 2016 07:42
Delete Client with associated loans
delete from m_note;
delete from `m_loan_installment_charge`;
delete from m_loan_overdue_installment_charge;
delete from m_loan_interest_recalculation_additional_details;
delete from m_loan_transaction_repayment_schedule_mapping;
delete from m_loan_repayment_schedule;
delete from `acc_gl_journal_entry`;
delete from m_loan_charge_paid_by;
delete from m_account_transfer_transaction;
delete from m_guarantor_transaction;
@vishwasbabu
vishwasbabu / AddUsers
Last active April 12, 2017 08:19
Add users to the demo server
Get email Id of the new user : lacris@mifos.org
If the user has sent thier public key, skip directly to step 2
1) Generate the new keypair in your mac
=======In you mac=====================
ssh-keygen -t rsa -C "youremailaddress"
@vishwasbabu
vishwasbabu / multipleTenantRegistartion.sql
Last active August 29, 2015 14:19
Fix Multiple entires for a tenant in tenants table
use mifosplatform-tenants;
/**Check if multiple entries exist for a tenant**/
select * from tenants where identifier = "ssi";
/***If this returns more than one entry, delete the duplicate entries (id is the id of the duplicate row you want to delete)**/
delete from tenants where identifier="ssi" and id="237";
/**Check again if multiple entries exist for a tenant (the query should return a single result)**/
select * from tenants where identifier = "ssi";
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.net.URL;
import java.net.URLConnection;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = ServerApplication.Configuration.class)
@WebAppConfiguration
@IntegrationTest({ "server.port=0", "management.port=0", "mariaDB4j.port=0", "mariaDB4j.dataDir=null" })
public abstract class AbstractSpringBootWithDatabaseIntegrationTest {
// do NOT put any helper methods here!
// it's much better to use composition instead of inheritance
// so write a test util ("fixture") and use it as a field in your test
@vishwasbabu
vishwasbabu / context.xml
Created January 26, 2015 14:02
Tomcat Configurations on Demo Server
<?xml version='1.0' encoding='utf-8'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0