Wednesday, May 30, 2012
Monday, May 14, 2012
Oracle select N latest entries
select * from (select * from monitor.at_process_log order by log_id desc)
where ROWNUM <=10;
To accomplish the equivalent to MySql:
select * from sometable order by name limit 20,10
AskTom proposes:
select * from (select a.*, ROWNUM rnum from
(select * from monitor.at_process_log order by log_id desc) a where rownum <= 20)
where rnum >= 10;
Wednesday, May 9, 2012
Thursday, May 3, 2012
Install Cisco VPN 4.8.02 on Fedora 14 (2.6.35)
- tar xvfz vpnclient-linux-x86_64-4.8.02.0030-k9.tar.gz
- cd vpnclient
- sudo ./vpn_install
- You will probably get failures. If you get failures:
- wget http://projects.tuxx-home.at/ciscovpn/patches/vpnclient-linux-2.6.24-final.diff
- patch < ./vpnclient-linux-2.6.24-final.diff
- This step shows failures, but I don't care (*)
- wget http://lamnk.com/download/vpnclient-linux-4.8.02-64bit.patch
- patch < ./vpnclient-linux-4.8.02-64bit.patch
- sed -i 's/^CFLAGS/EXTRA_CFLAGS/' Makefile
- wget http://lamnk.com/download/vpnclient-linux-2.6.31-final.diff
- patch < ./vpnclient-linux-2.6.31-final.diff
- sudo sed -i 's/const\ struct\ net_device_ops\ \*netdev_ops;/struct\ net_device_ops\ \*netdev_ops;/' `find /usr/src -name netdevice.h`
- Update interceptor.c like explained in (**)
- sudo ./vpn_install
- sudo /sbin/service vpnclient_init start
- Create a profile like in (***) and substitute values
- cp *.pcf /etc/opt/cisco-vpnclient/Profiles directory
- vpnclient connect site-name (site-name is the same as site-name.pcf)
[jerome@monster] > patch < ./vpnclient-linux-2.6.24-final.diff
patching file GenDefs.h
Hunk #1 succeeded at 105 with fuzz 2.
Hunk #2 succeeded at 122 (offset 2 lines).
patching file interceptor.c
Hunk #3 FAILED at 111.
Hunk #4 succeeded at 142 (offset 5 lines).
Hunk #5 FAILED at 364.
Hunk #6 FAILED at 921.
Hunk #7 FAILED at 949.
4 out of 7 hunks FAILED -- saving rejects to file interceptor.c.rej
(**)
Replace
static void interceptor_init(struct net_device *);
with
static
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
int
#else
int __init
#endif
interceptor_init(struct net_device *);
(***)
[main] Description=sample user profile Host=<x.x.x.x> AuthType=1 GroupName=<GroupName> GroupPwd=<GroupPwd> EnableISPConnect=0 ISPConnectType=0 ISPConnect= ISPCommand= Username=<Username> UserPassword=<UserPassword> SaveUserPassword=1 EnableBackup=0 BackupServer= EnableNat=1 CertStore=0 CertName= CertPath= CertSubjectName= CertSerialHash=00000000000000000000000000000000 DHGroup=2 ForceKeepAlives=1
Subscribe to:
Posts (Atom)