This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# $1 is json-schema file path | |
cat $1 | jq ".properties | to_entries[] | (.key + \" \" + .value.type)" | sed -e "s/integer/int/g" | sed -e "s/ \"$/ string\"/g" | sed -e "s/\"//g" | sed -e "s/$/,/g" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// sample code written to showcase how to use Mockito to mock certain methods to test logic in Singleton classes | |
public class MySingletonClass { | |
// not lazy initiated object. | |
private static final MySingeltonClass INSTANCE = new MySingletonClass(); | |
// can be used by unit test by Mocking it. Mockito invokes this default constructor. | |
@VisibleForTesting | |
MySingletonClass { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://eclipsecolorthemes.org/?view=theme&id=22933 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# This hook will run the eclipse code formatter before any commit | |
# to make the source look as it's supposed to look like in the repo. | |
ECLIPSE_HOME=$HOME/eclipse | |
STYLE_FILE=$HOME/org.eclipse.jdt.core.prefs | |
echo "Running pre-commit hook: run-eclipse-formatter---------------------" | |
echo "Will run eclipse formatter, using: $STYLE_FILE" | |
echo "Listing folders to run formatter on… " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install auto-hotkey on windows from http://www.autohotkey.com/ | |
Load script file with extension .ahk , containing belowl lines. This will swap caps lock and left ctrl key. | |
CapsLock::Ctrl | |
LCtrl::CapsLock | |
Load script, you are done :) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Gopi's _gvimrc file https://github.com/GopinathMR | |
" This file has been modified to make it work on both Windows and Linux | |
" Github gist location : https://gist.github.com/1100054 | |
" If you find any issues or add any enhancements, please submit revised version as gist | |
"---------------------------------------------------------------------------------------------------------- | |
" 1. OS specific | |
if ($OS == 'Windows_NT') | |
" Windows specific settings |