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 / loantransactions.sql
Last active December 14, 2015 03:09
Accounting scripts
select transactions.id as 'Transaction ID',
transactions.transactionType as 'Transaction Type',
transactions.reversed as reversed,
accounts.amount as amount,
accounts.transactionType as transactionType,
accounts.accountName as accountName,
accounts.accountType as accountType,
transactions.principal as principal,
transactions.interest as interest,
transactions.fee as fee,
@vishwasbabu
vishwasbabu / refresh-tomcat.bat
Last active December 15, 2015 07:49
Batch files for Handling git fork workflow (for MifosX)
@echo on
w:
cd W:\mifos\tomcat\webapps
DEL /F /S /Q /A mifosng-provider.war
RD /S /Q mifosng-provider
copy W:\mifos\mifosx\mifosng-provider\build\libs\mifosng-provider.war mifosng-provider.war
@vishwasbabu
vishwasbabu / gist:6433127
Last active October 11, 2016 17:52
MySQL Commands
--Enable MySQL General Log
SET global general_log = 1;
SET global log_output = 'table';
--MySQL Dump
mysqldump -uroot -ppassword dbname > dump.sql
--enable access from a particular system
GRANT ALL PRIVILEGES ON *.* TO [email protected] identified by "password"
@vishwasbabu
vishwasbabu / gist:7659222
Last active December 29, 2015 10:49
MySQL Connection timeout
>> Check number of max used connections
SHOW STATUS WHERE variable_name = 'Max_used_connections'
>> Check number of threads connected
SHOW STATUS WHERE variable_name = 'Threads_connected'
>> Update max connection variable
show variables like "max_connections";
@vishwasbabu
vishwasbabu / gist:4ee91202d04ac5e4c89e
Created May 8, 2014 07:33
MySQL update INR display symbols for MifosX
UPDATE `mifostenant-marudhara`.`m_currency` SET `display_symbol`=CHAR(226, 130, 185) WHERE `code`="INR";
UPDATE `mifostenant-marudhara`.`m_organisation_currency` SET `display_symbol`=CHAR(226, 130, 185) WHERE `code`="INR";
@vishwasbabu
vishwasbabu / gist:dc105b6a9450cff8ff1f
Last active March 2, 2018 10:12
Create schema_version in `mifosplatform-tenants`
mysql -uroot -pmysql
use `mifosplatform-tenants`;
CREATE TABLE `schema_version` (
`version_rank` int(11) NOT NULL,
`installed_rank` int(11) NOT NULL,
`version` varchar(50) NOT NULL,
`description` varchar(200) NOT NULL,
`type` varchar(20) NOT NULL,
@vishwasbabu
vishwasbabu / gist:07195af7f3b50af146c7
Created October 21, 2014 06:02
Alt for v_197_updated_loan_running_balance_of_transactions
drop table m_loan_transaction_temp;
/**Temp table with primary key and indices**/
CREATE TABLE `m_loan_transaction_temp` (
`id` BIGINT(20) NOT NULL,
`loan_id` BIGINT(20) NOT NULL,
`amount` DECIMAL(19,6) NOT NULL DEFAULT '0.000000',
`transaction_date` DATE NOT NULL,
PRIMARY KEY (`id`),
INDEX `loan_id` (`loan_id`),
mysqldump -u root -pmysql mifostenant-elevateafrica | mysql -u root -pmysql mifostenant-elevateafrica-dev
@vishwasbabu
vishwasbabu / gist:34e3544cd1c537251c67
Created November 19, 2014 15:34
Migrate a tenant Database
gradlew migrateTenantDB -PdbName=mifostenant-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