-
Archives
- March 2019
- March 2018
- June 2017
- May 2017
- November 2016
- September 2016
- July 2016
- June 2016
- May 2016
- April 2016
- March 2016
- February 2016
- January 2016
- December 2015
- November 2015
- October 2015
- September 2015
- August 2015
- July 2015
- June 2015
- April 2015
- December 2014
- October 2014
- September 2014
- May 2014
- April 2014
- March 2014
- January 2014
- November 2013
- October 2013
- October 2012
- September 2012
- August 2012
- July 2012
- June 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
-
Meta
Author Archives: ronaldpringadi
MongoDB Notes
When using MongoDB to store files, we have 2 collections: 1. The place where MongoDB store the file metadata: store.files 2. Ans place where MongoDB store the file content: store.chunks Depending on the size of the file, one entry in … Continue reading
Posted in Uncategorized
Leave a comment
CentOS 6 repo Settings
To fix repo settings in CentOS 6 1. make sure there is no proxy or funny settings in vi /etc/yum.conf 2. There are a couple of files within /etc/yum.repos.d/. Make sure the url are correct (accessible) and enabled=1 ll /etc/yum.repos.d/ … Continue reading
Posted in Linux
Leave a comment
Show Linux Partition Tree Mountpoint and If SSD
1lsblk -o TYPE,NAME,KNAME,UUID,MOUNTPOINT,SIZE,ROTA
Posted in Linux
Leave a comment
Setting log4j log level programmatically
12345678910111213141516private static void setupLog4j() { System.out.println("setupLog4j"); BasicConfigurator.resetConfiguration(); // Start clean. Logger.getRootLogger().removeAllAppenders(); // Create appender ConsoleAppender console … Continue reading
Posted in java
Leave a comment
Print java stack trace from anywhere
Need to know which code call a specific location? Dump the stack trace: 1LOG.trace(ExceptionUtils.getStackTrace(new Throwable()));
Posted in java
Leave a comment
Knowing you exception class name
To know what is your exception class name, in case you want to have a more specific catch. 1234 } catch (Exception e){ LOG.error("SQL error when processing " + requestId+". Exception … Continue reading
Bash string comparison
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465#!/bin/bash function test(){ echo "" echo "TEST $1" echo "VAR_1: $VAR_1 VAR_2: $VAR_2 " if [ "$VAR_1" = "false" ]; then echo " VAR_1 is false"; fi if [ "$VAR_2" = "false" ]; then echo " VAR_2 is false"; fi … Continue reading
Posted in Bash, Linux
Leave a comment