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:
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;;
echo "Update finished. Want to update more?"
This bash script is set as login shell for those users – so they can login and update their servers.
Just updated to 3.8 version and vomited.
Recently I had I problem with loading dll libraries for my java web start application. 32 bit library didn’t load on 64 bit OS and, of cause, vice verse.
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:
<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!
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.
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,
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!
I ran into a trouble while updating my Red Hat Enterprise Linux Server release 5.8 (Tikanga).
I could not use yum any more:
Решил утащить на память к себе две чудесные статьи, которые полностью описывают моё отношение к разработке. Из первой я несогласен только с одним абзацем – который говорит про невозможность работы с неработающим кодом.
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.
Oracle To Git
Спрятавшись за поваленным деревом, мы с ужасом смотрели, как стекло меняется под его пальцами. Там, где он прикасался, оставались жирные отпечатки, и оно темнело, становясь обычным хрупким материалом. Пролетевшая мимо разноцветная птица упала на землю, став серым воробьём. Мы услышали, как стекло хрустит под собственной тяжестью….