Categories Archives: Technical

Working with WinPE 3.0 images

Mount a WinPE image: dism /Mount-Wim /WimFile:winpe.wim /index:1 /MountDir:mount Inject PNP drivers into the WinPE image: Dism /image:mount /Add-Driver /driver:C:\drivers\blah\mydriver.inf Un-mount and commit the image: Dism /Unmount-Wim /MountDir:mount /Commit See what’s in the image: imagex /info install.wim Merge images: imagex /export source.wim 1 destination.wim “Image Name” /compress maximum Create a boot cd ISO: oscdimg -n […]

Limiting Bandwidth in Linux

The tc command in Linux can be used for fine-grained control over bandwidth throughput. In this case I have limited public outbound traffic to 50Mbps, and internal network traffic to 450Mbps. The syntax of tc is quite complex. So much so, I found a neat utility called ‘tcng’ (Traffic Control Next Generation) that interprits a […]

Lockfiles in Bash

Here’s a simple ‘skeleton’ script that will allow your Bash scripts to use a PID file, or ‘lockfile’. This ensures that only one instance can run at a time which is useful for daily Cron activities such as mirror updates. #!/bin/bash pidfile=/var/run/ if [ -e $pidfile ]; then pid=`cat $pidfile` if kill -0 &>1 > […]

Etherchannel 802.1q trunk between Cisco and Foundry

Foundry and Cisco both implement port grouping (load sharing) but are very different.  The following code snippets describe the configuration needed between the two very different platforms to create a working Etherchannel trunk. On the Cisco, ports 23 and 24 form the group for port-channel1: port-channel load-balance src-dst-ip interface Port-channel1 switchport trunk encapsulation dot1q switchport […]

Alternate Row Shading in Excel

One way to make your data legible is to apply cell shading to every other row in a range. Excel’s Conditional Formatting feature (available in Excel or later) makes this a simple task. Select the range that you want to format Choose Format, Conditional Formatting In the Conditional Formatting dialog box, select Formula Is from […]