Author Archives: Greg Rowe

Some notes about Group Policy

I’m not a Windows admin.  However managing a Windows network has become my responsibility.  These are some useful things I learned today.  Most notably that gpresult is an indispensable tool for debugging GPO problems.  The /scope option can be used … Continue reading

Posted in Uncategorized | Leave a comment

Ncurses Appearance Via Putty

I ran into a situation where I wanted to run `make menuconfig` via putty.  All of the graphical characters looked wrong.  Apparently this is a deficiency in Putty handling vt100 commands.  There is a workaround.  Setting the evar below will … Continue reading

Posted in Uncategorized | Leave a comment

Mounting Partition from Disk Image

I’ve long known that you can mount a filesystem image using a loop device.  What I did not know until today is that you can mount partitions from a disk image using a loop device! Insert the loop module specifying … Continue reading

Posted in Uncategorized | Leave a comment

DD Progress

Sometimes you’ll want to know how far along ‘dd’ is in a copy. It’s not hard to do but it’s hard to remember. If you send a USR1 signal to the ‘dd’ process it will print the current progress. Here’s … Continue reading

Posted in Geek, Tips | 1 Comment

Serverside PUT Using PHP

It is possible to do an HTTP put, server side, in PHP without using a PECL extension or curl. This code is far from perfect but it shows how to accomplish the task. function httpPut($url, $data, $optional_headers = null) { … Continue reading

Posted in Code, Geek | Leave a comment

No, It's Not OK

The code below is broken in a subtle way. There’s no way to know that ptr is aligned on a boundary that your CPU architecture may require. And I don’t think there is any way to know until runtime. Oh, … Continue reading

Posted in Code, Geek | Leave a comment

Mixing Static and Dynamic Linkage

Using GNU tools you can mix static and dynamic linkage using: gcc foo.o -Wl,-Bstatic -lstatic1 -lstatic2 -Wl,-Bdynamic -ldynamic1 Just be careful. The way the linker resolves symbols in static libraries is not what you might expect. It would be nice … Continue reading

Posted in Geek, Tips | Leave a comment