Many times I wondered how to test SNMP GETs/WALKs.. Well here's a quick cmdline:
snmpbulkwalk -v2c -Os -c public hostname [ipadentaddr|system|anything else]
For more thorough tests (also get traps etc etc) I use the Windows GUI.
Many times I wondered how to test SNMP GETs/WALKs.. Well here's a quick cmdline:
snmpbulkwalk -v2c -Os -c public hostname [ipadentaddr|system|anything else]
For more thorough tests (also get traps etc etc) I use the Windows GUI.
In the following code, I wanted the parent div to expand to the size of the child. But it doesn't work this way:
<div id="parent">
<div id="child" style="width: 500px">Child Text</div>
</div>
Instead, the parent takes 100% of the screen width and does not shrink to the width of the child. Quite a long googling revealed some interesting facts:
PXE boot might need different configuration for different subnets (i.e. server names/IPs are different).
PXELinux has a neat feature: in the pxelinux.cfg/ directory, one can put different configuration files for different machines or subnets, identified by the file name:
The configuration file names can be:
default
: if nothing else matches, PXELinux will load the config named "default".In an older post I wrote about supporting the new e1000 in CentOS 5.
Apparently on machines with the same new Intel board, not only the Ethernet driver (e1000) should be updated but also the sound driver (snd-hda-intel) and graphics driver (xorg i810 driver).
Lots of work, eh? Well - no! CentOS / RHEL 5.1 just contain them all.
I didn't test the 3D graphics driver though.
Apparently the issue got changed since RedHat 4, which had /etc/sysconfig/rawdevices, /etc/init.d/raw & /usr/bin/raw.
This version introduces /etc/udev/rules.d/60-raw.rules & /bin/raw.
A. Doing it manually (example):
/bin/raw /dev/raw/raw1 /dev/sdb1
of course, it'll be forgotten after reboot. so:
B. Doing it the right way - udev (example):
ACTION=="add", KERNEL=="sdb1", RUN+="/bin/raw /dev/raw/raw1 %N"
KERNEL=="raw[1-2]", MODE="0640", GROUP="oinstall", OWNER="oracle"
The header of rules.d/60-raw.rules file mentions that this method of using raw devices is deprecated. But still, I think that's the only available way if one wants to use raw devices with Oracle RAC, Either for cluster issues (Voting+OCR) or simple Oracle data files.
C. Oracle RAC raw device permissions
You might ask: what permissions should I give the Oracle RAC disks? This is what I've found out with Roman, a DBA expert who came to help:
Disclaimer: I'm not a DBA expert; I hope this helps. Don't blame me if it ruins important data; send comments if you think I'm wrong/right.
Another "OK THIS IS EVIL" article.
Microsoft decided to modify the TIFF format to their own needs (I guess that source code is not available). Microsoft Document Imaging supports two formats: MDI and a non-standard TIFF.
Then I found a good article which explains how to read it anyway. EVIL.
We all know how to add a virtual IP using ifconfig command line:
ifconfig eth0:1 192.168.1.5 up
Apparently Linux' /sbin/ip tool provides an alternative:
ip addr add 192.168.1.5/24 dev eth0
This way we do not create a new interface at all: this is a secondary IP that belongs to eth0. Also, it's "hidden" from ifconfig (at least until someone fixes that..), which most people use. Cool, eh?
Apparently RedHat cluster uses this method for adding a Virtual IP to a machine, while Linux-ha (version 1 at least), Veritas cluster and Oracle RAC use the traditional, eth0:1-like addresses.
The /sbin/ip tool seems very powerful.. I should learn some more tricks =)
The more keyboard shortcuts - the better. The amazing fact is that both Firefox and IE have very similar keyboard shortcuts for handling tabs:
Ctrl+T | Create a new tab |
Ctrl+W | Close current tab |
Ctrl+PgDn, Ctrl+PgUp Ctrl+Tab, Ctrl+Shift+Tab |
Go to next/previous tab |
Ctrl+[0-9] (In Linux: Alt+[0-9]) |
Go to tab #[0-9] |
Got something else? 🙂
Many websites use session-cookies (PHP session installs such a cookie, for example). Session-cookies have expiry time of zero, and the browser usually deletes them after closing its window. This is very useful for a 'log-in' session, like in your bank account, gmail, etc.
So all browsers delete the cookie as you close them, but what happens when you open a new browser window or tab? Does it also respect this temporary, session cookie? If you're logged in to gmail from one window, can you open a new browser window with another gmail account?
The answer is not surprising: that depends on your browser.
Today I wanted to catch a 'mouse-out' event in a div. Every time the mouse leaves the div, I want to call a function So.. there's the onmouseout event which, at first sight, does exactly what I needed.
<div id="parent" style="height: 500px; width: 500px;" onmouseout="alert('out!');">
<table id="child"><tr><td>child text</td></tr>
</div>
HOWEVER - if the div contains child elements (it usually does.. like above example), when mouse moves from the "bare naked" div directly to its child element, an 'onmouseout' event is called from the div, while the mouse is still inside the borders of the div. And the worst news is that it's not a bug! 🙂
So straight to the sad solution: onmouseleave event does exactly what I needed, but isn't standard and is IE-only (same goes for onmouseenter). As Rick summed it in the post which solved my issue today: "Bummer."
So bummer, but the good thing is that among the reads, I've found this must-read article which talks about the order browsers handle the events, and how to deal with it.