Friday, April 29, 2011

Linux Fonts

Step 1: Download fonts from [1]
Step 2: unzip and copy to default fonts path
$cp -r /home/user/Desktop/Downloads/fontfolder /usr/share/fonts/
Step 3: Update fonts cache
$fc-cache /usr/share/fonts/fontfolder/

Resources:

[1] fonts http://www.portalplanetasedna.com.ar/fuentes1.htm

Thursday, April 28, 2011

Ghost::How to Clone Partition from Intel to Amd processor.

boot from windows xp cdrom, and select install(F8) and next repair(After copying the installation data to the drive, you should boot once again from the cdrom - not from your harddisk)
on second boot select Repair on first screen, login and execute next commands.

cd c:\windows\system32\drivers
c:\windows\system32\drivers>del intelide.sys
c:\windows\system32\drivers>del intelppm.sys

exit and wait reboot

Note:
I try delete files after clone(using external boot cd) and reset then works fine.

References:
[1]http://www.cpuhack.com/wordpress/?p=142
[2]using register mode http://support.microsoft.com/kb/314082

ASP.NET::The timeout period

The timeout period elapsed prior to completion of the operation or the server is not responding.

try below options, set command timeout parameter to 0. It will execute till the end. By default it will timeout in 30 secs.

Using Code:

sqlCommand.CommandTimeout = 0;

Using Connection String: Check the timeout in connection string, try setting it to max...
data source="ServerName;initial catalog=DataBaseName;uid=ID;pwd=Password;Connect Timeout=120"

Using Sql Server:On the SQL Server also you can set timeout of a query. Check with SQL Server DBA's to know the Query time out set on servers.

Using IIS: On IIS also you have timeout setting. In IIS --> Website tab --> Connection time out box . Set the max timeout value (in secs) IIS should maintain idle connection .

check all these possibilities

Wednesday, April 27, 2011

OpenSUSE::Install JRE1.6

Step 1:Download JRE from [2]
#wget ....
Step 2: Executing installer
#chmod +x jre-6-linux-i586.bin
#./jre-6-linux-i586.bin
Step 3:Move directory to common
#mv jre1.6.0 /usr/lib/jvm

Step 4:Set new Java to "alternatives of java":
#update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jre1.6.0/bin/java" 1
Step 5:Verify version
#java -version
references:

[1] Instalar JAVA JRE 1.6.0 en Firefox http://www.ubuntu-es.org/node/33116
[2] JRE repository
EShttp://www.java.com/es/download/linux_manual.jsp
ENhttp://www.java.com/en/download/linux_manual.jsp

Monday, April 25, 2011

Web Security

Articles : How to hack a website (Basic sql injection)
http://www.ecademy.com/node.php?id=76050

references:
http://www.thc.org/thc-hydra/

Enable/Disable Firefox Cookies

on url address put about:config and search next item.
network.cookie.alwaysAcceptSessionCookies //verify value is true


References:
http://support.mozilla.com/es/kb/Habilitar%20y%20deshabilitar%20cookies

Tuesday, April 19, 2011

Spring MVC

Spring MVC Fast Tutorial (with sources for download)
http://maestric.com/doc/java/spring

Postgres::Drop connections

--List all of the open connections to a given database
select * from pg_stat_activity where datname='database';

--Drop all of the open connections to a given database:
select pg_terminate_backend(procpid) from pg_stat_activity where datname='database';
--More samples
select * from pg_stat_activity where date(backend_start)='2011-04-19';
select pg_terminate_backend(procpid) from pg_stat_activity where date(backend_start)='2011-04-19';

--One sample more specific
select * from pg_stat_activity where backend_start < '2011-05-04 10:00' and waiting=false order by backend_start desc
select pg_terminate_backend(procpid) from pg_stat_activity where backend_start < '2011-05-04 10:00' and waiting=false

select pg_terminate_backend(procpid) from pg_stat_activity where backend_start < '2011-08-05 07:00' and datname='' and waiting=false

References:
http://www.postgresql.org/docs/current/static/functions-admin.html#FUNCTIONS-ADMIN-SIGNAL-TABLE
http://www.postgresql.org/docs/8.4/static/monitoring-stats.html#MONITORING-STATS-VIEWS-TABLE

Friday, April 15, 2011

Default Setting of SMTP

Gmail
Outing Server:smtp.googlemail.com
port:465
Connection Security:SSL/TLS

Firefox open multiple private window

    /opt/firefox/firefox-bin --profile $(mktemp -d) --private-window www.google.com www.bing.com