This file contains hidden or 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
Reader reader = clobObject.getCharacterStream(); | |
StringWriter writer = new StringWriter(); | |
IOUtils.copy(reader, writer); | |
String clobString = writer.toString(); |
This file contains hidden or 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
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Maintainer: | |
" Amir Salihefendic | |
" http://amix.dk - [email protected] | |
" | |
" Version: | |
" 5.0 - 29/05/12 15:43:36 | |
" | |
" Blog_post: | |
" http://amix.dk/blog/post/19691#The-ultimate-Vim-configuration-on-Github |
This file contains hidden or 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
# removes two spaces from beginning of each line | |
:%s/^\ //g |
This file contains hidden or 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
jps -lv |
This file contains hidden or 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
import javax.crypto.Cipher; | |
import java.security.spec.KeySpec; | |
import javax.crypto.spec.PBEKeySpec; | |
import javax.crypto.SecretKey; | |
import javax.crypto.spec.SecretKeySpec; | |
import javax.crypto.SecretKeyFactory; | |
import java.security.AlgorithmParameters; | |
import javax.crypto.spec.IvParameterSpec; | |
public class Decrypter { |
This file contains hidden or 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
The MIT License (MIT) | |
Copyright (c) 2015 Justin Perry | |
Permission is hereby granted, free of charge, to any person obtaining a copy of | |
this software and associated documentation files (the "Software"), to deal in | |
the Software without restriction, including without limitation the rights to | |
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | |
the Software, and to permit persons to whom the Software is furnished to do so, | |
subject to the following conditions: |
This file contains hidden or 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
// If a push to the remote origin was already done then do the following | |
1. git stash // in same directory as previous commit | |
2. git reset --hard HEAD~1 // reset to the commit before last | |
3. git stash apply | |
4. Build if necessary and test | |
5. Commit whatever is needed | |
6. git push origin HEAD --force | |
7. Done | |
8. Have cake |
This file contains hidden or 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
:syntax on | |
:set syntax=whitespace | |
... then search for a string | |
...tab characters will be highlighted in blue | |
...space characters will be highlighted in red | |
If comparing more than one file in split windows, switch to that file (Ctrl-W w) | |
and set the syntax equal to whitespace to enable the color coding effect (:set syntax=whitespace). |
This file contains hidden or 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
#Open two files that need to be diffed | |
:e file1 | |
Ctrl-w n | |
:e file2 | |
:windo diffthis | |
:windo diffoff | |
Ctrl w t Ctrl w H (horizontal) | |
Ctrl w t Ctrl w K (vertical) |
This file contains hidden or 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
import java.util.Collection; | |
import java.util.List; | |
import java.util.ListIterator; | |
import org.springframework.data.domain.PageImpl; | |
import org.springframework.data.domain.Pageable; | |
/** | |
* Extension class between spring data commons and java.util.List that is | |
* required to get MyBatis to use it as a return value. |