Skip to main content

Posts

HTTPS in Tomcat 6.0 Server

1. Create a self-signed server certificate using keytool . Take note of the keystore password, you will need it later on for setting up the server. keytool -genkeypair -alias tomcat -keyalg RSA -keysize 1024 -dname "CN=localhost, OU=Group, O=Company Name, L=City, S=Region, C=PH" -validity 365 -keystore keystore 2. Move the generated certificate file (keystore) to Tomcat’s conf directory. 3. Modify conf/server.xml <Connector port="443" protocol="HTTP/1.1" SSLEnabled="true" maxThreads="150" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" keystoreFile="conf/keystore" keystorePass="your password" /> 4. Restart Tomcat. 5. Visit this link https://localhost:443/ . You will receive a warning about the self-signed certificate. If you want to get away with this warning, purchase a commercial certificate.

My New Android 1.6 / Debian Tablet Splash Screen

Logos are registered trademarks of their respective owners. Created using The GIMP .

MD5 Hash Function for Oracle

Basically there are 2 functions needed. Some people prefer the raw hash instead of the hex equivalent. 1. md5raw - for encoding text in raw md5 hash 2. md5 - for converting raw md5 hash to hex. Here’s the code for the md5raw function. create or replace function md5raw (text in varchar2) return varchar2 is hash_value varchar2(20); begin hash_value := dbms_obfuscation_toolkit.md5 (input_string => text); return hash_value; end; and the code for the md5 function. create or replace function md5(text in varchar2) return varchar2 is hash_value varchar2(32); begin select lower(rawtohex(md5raw(text))) into hash_value from dual; return hash_value; end; Now you can do something like this. select md5('koala') from dual; |---------------------------------------| |MD5('koala') | |---------------------------------------| |a564de63c2d0da68cf47586ee05984d7 | |---------------------------------------|

Access VirtualBox Shared Folder in Ubuntu Guest

I have been doing this for quite some time now but I failed to document it. First, install the VirtualBox Guest Additions on your host. Then you create a mount point (assuming it is /media/shared). $ sudo mkdir /media/shared You may change the path if you want. Mount the shared folder using the command below. $ sudo mount -t vboxsf <folder> /media/shared Replace the <folder> above with the correct shared folder name. Enjoy.

Play Low Quality Videos in Gome Flytouch

One of the common problems of Gome Flytouch is its inability to play high quality videos. Here is a trick by Kiarov for converting videos to a lower quality in order to be playable - Gome Flytouch Video Encoding Tutorial . Do not forget, you must have your tablet overclocked to 400MHz. The software used for conversion was HandBrake but you can use any converter of your choice. The converted videos work well with Meridian Player . Here’s the settings: Type: MP4 Size: 480x320 Video Bit Rate: 384 kbps Frame Rate: 25 fps Video Encoder: XVid Audio Encoder: AAC Sample Rate: 44.1 KHz Audio Bit Rate: 64 kbps

G Sensor and Camera Fix for Gome Flytouch

Some Gome Flytouch tablets have their G sensors and cameras inverted by default. There are two ways to fix these. 1. If you’re creating your own firmware, it’s better to include the fix right on the scriptcmd file. For the G sensor, add this line: setenv gsensor_axis 0,-1,1,1,2,1 and for the camera: setenv camera_rotate 270 2. If you had your device rooted, just execute the commands above on any Android terminal as root.