Most KVM (e.g. ATEN CS62U) won't compatible with NKRO (N-Key Roll Over) keyboard (e.g. Most mechanical keyboard are with NKRO).
So please pay more attention when purchasing a KVM for NKRO keyboard.
Thursday, December 22, 2016
Tuesday, August 23, 2016
git commands
There are some useful git commands:
Setup a repository:
git init --bare
Copy an existing repository:
git clone drive:
Add file to repository:
git add file
git commit
git push
Get updated files from repository:
git fetch
Merge updated files to my workspace:
git merge
Setup a repository:
git init --bare
Copy an existing repository:
git clone drive:
Add file to repository:
git add file
git commit
git push
Get updated files from repository:
git fetch
Merge updated files to my workspace:
git merge
Tuesday, August 9, 2016
Web Application Firewall (WAF)
By definition, WAF is going to filter out web request containing SQL injection, cross-site scripting, etc.
Ref: https://www.owasp.org/index.php/Web_Application_Firewall
Ref: https://www.owasp.org/index.php/Web_Application_Firewall
Thursday, July 21, 2016
Smallest font size in Chrome
Since Chrome has a smallest font size setting, you can't use CSS to set font size less than (12px, by default):
font-size: 6px !important; /* This has no effect ! Sigh .. */
Instead, you may consider to use transform instead:
transform: scale(0.833); /* 10/12 = 0.833 */
And you may also consider to shift the <div> container to fix the position changed by transform:
position: relative;
left: -15px;
font-size: 6px !important; /* This has no effect ! Sigh .. */
Instead, you may consider to use transform instead:
transform: scale(0.833); /* 10/12 = 0.833 */
And you may also consider to shift the <div> container to fix the position changed by transform:
position: relative;
left: -15px;
Friday, June 10, 2016
Backup and Restore with PostgreSQL
Enter psql
DOS> psql -U user database_name
DOS> psql database_name (if no password defined)
Drop DB
DOS> dropdb database_name
PSQL# drop database database_name
Create DB
DOS> createdb database_name
PSQL# create database database_name
Dump DB
DOS> pg_dump database_name > file_name
Restore from Dump
DOS> psql -U user -d database_name -f file_name
Monday, May 23, 2016
Make web application start up faster
To make web application start up faster in Tomcat, you may consider the following tuning:
- Add metadata-complete="true" as an attribute in <web-app> tag
- Add <absolute-ordering/> inside <web-app> </web-app>
Tuesday, February 23, 2016
Change font size by language using CSS
Quick useful when browser render text with different size in different languages:
html:lang(en) h1{
font-size: 20px;
}
html:lang(ko) h1{
font-size: 10px;
}
Reference: http://stackoverflow.com/questions/15267355/change-font-size-based-on-language
Tuesday, January 5, 2016
Using @RunWith(SpringJUnit4ClassRunner.class)
If you use @RunWith(SpringJUnit4ClassRunner.class) in a JUnit test class and it just cannot run, do double check your JUnit version.
It requires JUnit 4.9 or above.
It requires JUnit 4.9 or above.
Subscribe to:
Posts (Atom)
Sync multiple git repo at once
Use the following command in Linux will do the job: ls -d RepoNames* | xargs -I{} git -C {} pull
-
When Office2003 couldn't find file SKU011.CAB: regedit -> [HKEY_LOCAL_MACHINE] -> [SOFTWARE] -> [Microsoft] -> [Office] -&...
-
The resolution can be changed by editing the BlueStack's registry: HKLM\SOFTWARE\BlueStacks\Guests\Android\FrameBuffer\0\Height and ...
-
To count the number lines of files / stdout in Linux, we uses "wc -l" to achieve. In Windows, we use the following instead: find...