Searching through skype history

If you have more then 300 contacts and they have overlapping conversations - you understand that it’s impossible to find anything with simple Ctrl+F approach.

Fortunately, Skype uses SQLite database and we can make a direct connect to it and search there directly. So, you need to:

  1. Download SQLite client (i used http://sqlitebrowser.org/ but you can install any client you like)
  2. Find your history file as it is decribed on skype web site:
Hold down the Windows key The Windows key on your keyboard, then press R to bring up the Run window. If you are using a touch screen device on Windows 8, you can bring up the Run window from the Search charm. Type %appdata%\Skype into the Run window and press Enter. Open the folder named after your Skype Name. Find the main.db file in the folder, this file is your chat history.
3) Use your SQLite client to open this file. 4) Open database table "messages" 5) Use any SQL queries you want to search for message you need. Here's an example of me searching for "git" word in conversations - but there are many field that you can use for searching and ordering.

Simple bash linux script to login and update web sites from Git repositories

We have some web sites which must be updated from Git repositories by users who have no other permissions on web server. For this task, I imported SSH key to server for authorizing on bitbucket and wrote a simple bash script for four different repos:

#!/bin/bash
 
while true; do
echo "Please choose api to update (enter number)"
select repo in "dev" "a" "b" "test" "EXIT"; do
    case $repo in
        dev ) cd /web/dev;echo "updating:";pwd;git pull origin master; break;;
        a ) cd /web/a;echo "updating:";pwd;git pull origin master; break;;
        b) cd /web/b;echo "updating:";pwd;git pull origin master; break;;
        test ) cd /web/test;echo "updating:";pwd;git pull origin master; break;;
        EXIT ) exit;break;;
    esac
done
echo "Update finished. Want to update more?"
echo ""
done

This bash script is set as login shell for those users - so they can login and update their servers.

Java applet not working after refresh

I had a funny problem with my java applet in web start application - it worked every second time I refreshed web page.

After a little debug I found out that java machine didn’t make it in time to shutdown, start and show applet.

Solution was rather fun:

1
<param name="separate_jvm" value="true" />

It helped because now new instance off applet launched in a new JVM, simultaneously with closing old instance of applet in old JVM.

But be careful if your applet writes something to user disk or etc - both old and new instance can be doing is for a little time!

Invalid signature file digest for Manifest main attributes

Today i run into error

Invalid signature file digest for Manifest main attributes
while running my java web start applet.

I wondered for a while and finally found the reason - yesterday I modified my .pfx key for signing applet, but manifests in jars merge with each other - so I really had jar with invalid digest.

To fix it, I just had to remove META-INF folder from all my jars, add them manifest again and re-sign them. You can remove it with any archiver - for example, with 7-zip.

Warning: The signer`s certificate chain is not validated

I had a week of trouble, signing my web start java applet.

While I signed (with a good COMODO code signing certificate), there was

**Warning: The signer's certificate chain is not validated.**
But I didn't pay much attention to it.

And my signed applet appeared to be of unknown publisher even through “Show details” in browser showed me that applet is signed with the correct certificate. Of cause, it was much restricted - and I need to read user disc, etc… It could be solved my directly installing CA to user computer - but that’s unreasonable to request every user to do it manually. So I suffered for a week and suddenly came up with a solution, inspired by this post (thank you, Supriya Roy):

  1. Install your .pfx certificate with the “Mark this key as exportable. This will allow you to back up or transport your keys at a later time” and “Include all extended properties” checked.

  2. Check that that you have full certificate chain for this certificate and it is valid. Otherwise, install neccessary CA.

  3. Export the installed certificate with “Yes, export the private key” option and “Include all certificates in the certification path if possible” and “Export all extended properties” checked under the option .PFX or PKCS #12.

  4. Use exported .pfx file to sign the JAR. Don’t forget that it could change alias - get new one with

keytool.exe -list -keystore D:\keys\code.pfx -storetype pkcs12

Worked like magic - warning disappeared and my jars are trusted now!

Немного про разработку

Решил утащить на память к себе две чудесные статьи, которые полностью описывают моё отношение к разработке. Из первой я несогласен только с одним абзацем - который говорит про невозможность работы с неработающим кодом.

OracleToGit: released!

At last, I released a useful tool for Oracle DBAs - a special customizable script which helps you to store database DDL (views, tables, package code…) in Git repositary so that you can always see history of object’s changes.

Have fun!

Oracle To Git

Мир Тьмы: Белоснежка

Спрятавшись за поваленным деревом, мы с ужасом смотрели, как стекло меняется под его пальцами. Там, где он прикасался, оставались жирные отпечатки, и оно темнело, становясь обычным хрупким материалом. Пролетевшая мимо разноцветная птица упала на землю, став серым воробьём. Мы услышали, как стекло хрустит под собственной тяжестью….