Using WLST can be frustrated because all of the global functions that seemingly cannot be used inside classes. Putting functions in classes and making re-usable libraries is common practice in the current development world. Most developers would like to avoid spagetti-monsters; although some still seems to like the idea of spagetti with tomato sauce.
To use the global commands of WebLogic's WLST import the correct module:
import wlstModule as wlst
wlst.connect('weblogic','welcome1','t3s://localhost:7002')
wlst.redirect('/var/log/weblogic.log')
Thanks to: http://stackoverflow.com/questions/8252846/wlstmodule-connection-information-lost
Wednesday, 3 October 2012
Tuesday, 2 October 2012
Remove files older then X days on Linux
I always forget how i can clean up my /var/log. Therefor i dump the code snippet i need to do this. And it is so very simple...
Delete all files older then 3 days in current and child directories:
find . -mtime +3 -exec rm -rf {} \;
Delete all files older then 3 days in current and child directories:
find . -mtime +3 -exec rm -rf {} \;
Friday, 14 September 2012
PC speaker beep is so annoying
When working on a linux machine and tabbing out your commands, it often happens that you hear the speaker beep. This can be very annoying. So let's turn it off. Remove the pc speaker modules "pcspkr" and "snd_pcsp". You might have only one of these modules in use, but they both enable beeps.
Open a terminal and issue this command as root:
# modprobe -r pcspkr snd_pcsp
To prevent the "pcspkr" and "snd_pcsp" modules from loading again at startup add them to modprobe's blacklist in /etc/modprobe.d/blacklist. You can do this with the following command:
# vi/etc/modprobe.d/blacklist
blacklist pcspkr
blacklist snd_pcsp
See: http://www.thinkwiki.org/wiki/How_to_disable_the_pc_speaker_(beep!)
Open a terminal and issue this command as root:
# modprobe -r pcspkr snd_pcsp
To prevent the "pcspkr" and "snd_pcsp" modules from loading again at startup add them to modprobe's blacklist in /etc/modprobe.d/blacklist. You can do this with the following command:
# vi
blacklist pcspkr
blacklist snd_pcsp
See: http://www.thinkwiki.org/wiki/How_to_disable_the_pc_speaker_(beep!)
Tuesday, 28 August 2012
How to roll back packages on CentOS 5 / RHEL 5
CentOS 5 / RHEL 5 preferably uses yum as the program to update, install and remove packages.
When you’ve installed/updates packages with yum or rpm, you can quite easily roll back the updates/installations using rpm.
For this, yum and rpm need to save roll back information, which they do not do by default.
To enable the roll back feature, do the following:
Add tsflags=repackage to /etc/yum.conf.
Add %_repackage_all_erasures 1 to /etc/rpm/macros. If /etc/rpm/macros does not exist, just create it.
You can now install, erase and update packages with yum and/or rpm, and they will save roll back information.
When you want to roll back, use rpm to do so.
You do this by specifying the --rollback switch and a date/time, like the examples below:
rpm -Uhv --rollback '19:00'
rpm -Uhv --rollback '8 hours ago'
rpm -Uhv --rollback 'december 31'
rpm -Uhv --rollback 'yesterday'
Source: http://www.vincentverhagen.nl/2007/12/10/how-to-roll-back-packages-on-centos-5-rhel-5/
When you’ve installed/updates packages with yum or rpm, you can quite easily roll back the updates/installations using rpm.
For this, yum and rpm need to save roll back information, which they do not do by default.
To enable the roll back feature, do the following:
Add tsflags=repackage to /etc/yum.conf.
Add %_repackage_all_erasures 1 to /etc/rpm/macros. If /etc/rpm/macros does not exist, just create it.
You can now install, erase and update packages with yum and/or rpm, and they will save roll back information.
When you want to roll back, use rpm to do so.
You do this by specifying the --rollback switch and a date/time, like the examples below:
rpm -Uhv --rollback '19:00'
rpm -Uhv --rollback '8 hours ago'
rpm -Uhv --rollback 'december 31'
rpm -Uhv --rollback 'yesterday'
Source: http://www.vincentverhagen.nl/2007/12/10/how-to-roll-back-packages-on-centos-5-rhel-5/
Thursday, 1 March 2012
Telnet under Win7
It’s very rare that I use Telnet these days, so it took a long time for me to notice that by default it was not packaged with Windows 7. I did some research and found out that this was also true for Windows Vista. More than likely this was an attempt to make Windows more secure by default, as Telnet is very insecure and whenever you have the choice you should always use SSH. However, with that being said, you can quickly re-enable Telnet by following these steps:
- Start
- Control Panel
- Programs And Features
- Turn Windows features on or off
- Check Telnet Client
- Hit OK
After that you can start Telnet via Command Prompt.
Source: http://www.fettesps.com/windows-7-enable-telnet/
- Start
- Control Panel
- Programs And Features
- Turn Windows features on or off
- Check Telnet Client
- Hit OK
After that you can start Telnet via Command Prompt.
Source: http://www.fettesps.com/windows-7-enable-telnet/
Wednesday, 28 September 2011
Version Control for Multiple Agile Teams
If we have several agile development teams working on the same codebase, how do we minimize the risk of stumbling over each other? How do we ensure that there always is a clean, releasable version at the end of each iteration?
http://www.infoq.com/articles/agile-version-control
http://www.infoq.com/articles/agile-version-control
Wednesday, 13 July 2011
New PUTTY!
After 4 years there's a new release of the infamous SSH-client: Putty 0.61 is out
Grab your copy here: http://www.chiark.greenend.org.uk/~sgtatham/putty/
Grab your copy here: http://www.chiark.greenend.org.uk/~sgtatham/putty/
Subscribe to:
Posts (Atom)