Remote diff over SSH
diff <(ssh myServer1 'cat foo') <(ssh myServer2 'cat foo')
diff <(ssh myServer1 'cat foo') <(ssh myServer2 'cat foo')
#!/bin/sh
#
# Startup script for persistent tcpdump
#
# chkconfig: 345 86 14
# description: Packet Capture
# processname: tcpdump
PCAP=/mnt/tcpdump/tcpdump.pcap
SIZE=100
COUNT=20
PIDFILE=/var/run/tcpdump
start() {
if [ -f $PIDFILE ]; then
echo "PID File $PIDFILE exists"
exit 1
fi
tcpdump -nn -w $PCAP -s0 -C $SIZE -W $COUNT -Z root not port 22 > /dev/null 2>&1 &
echo $! > $PIDFILE
exit 0
}
stop() {
if [ ! -f $PIDFILE ]; then
echo "PID File $PIDFILE does not exist" Link to one source
Link to another
Basically, you need to change the registry ownership on the following two keys to 'Administrators'. This allows you to edit the IIS WAMREG dcom object:
HKCR\AppID\
HKCR\Wow6432Node\AppID\
Traversed by index:
For j As Integer = i To UBound(MyArray)
MyArray(j) = MyArray(j + 1)
Next j
ReDim Preserve MyArray(UBound(MyArray) - 1)
Traversed by element ('for each' loop):
SSIS is probably one of the most non-intuitive GUIs I've ever seen from Microsoft, and it appears to be broken in many interesting ways. Despite this frustration, the functionality it provides is indispensable. This page will document how to perform a simple conditional split.
log4j.rootLogger=INFO, CATALINA, SYSLOG # Define all the appenders
For People who hate themselves and run SELinux
If you decide to run SELinux and Apache starts throwing errors like the following:
[Tue Jan 10 14:44:42 2012] [error] (13)Permission denied: proxy: HTTP: attempt to connect to 1.2.3.4:8080 (some_host_name) failed
[Tue Jan 10 14:44:42 2012] [error] ap_proxy_connect_backend disabling worker for (some_host_name)
Chances are SELinux is stopping Apache from making network connections. To correct this problem execute
This wrapper for cssh allows you to copy/paste a vertical list of IP addresses onto the command line, such as from a spreadsheet.
#!/bin/bash echo "$@" | xargs /usr/bin/cssh &
Usage Example:
$ cssh '1.2.3.4 1.2.3.5 1.2.3.6 1.2.3.7'
Gridviews are awesome, but what if you want to use arraylists to make them in the code-behind? For example, maybe you want to re-use the same gridview control with different data rather than have a custom control built specifically for each data set. This guide will show you how to 'self-wire' the gridview controls so you can build them directly and dynamically. This will reduce the attack surface of your web applications, making them more secure and reduce redundant code and controls, making them easier to maintain.
How to encrypt passwords in tomcat-users.xml