Here's a quick little script to use to generate several 63 byte WPA keys for your wireless router:
#!/bin/sh echo Generating 10 random 63 byte WPA key... >&2 for i in 1 2 3 4 5 6 7 8 9 0 do head -c 256 </dev/random | tr -cd "[!-~]" | head -c 63 echo done
I have a web form with several fields. When the user submits the form, they usually only enter data into one of the fields. I wanted the resulting GET url to only include the field(s) they entered any information into. Here's the code I came up with:
This appears to work on at least the following browsers:
- Firefox 1.0.6
- IE 6.00
- Opera 8.0
If anyone has a better solution, either client-side, or server-side, I would love to hear it.
on my sid box, and got the error
Preparing to replace udev 0.056-3 (using .../archives/udev_0.063-1_i386.deb) ... udev requires a kernel >= 2.6.12, upgrade aborted. dpkg: error processing /var/cache/apt/archives/udev_0.063-1_i386.deb (--unpack): subprocess pre-installation script returned error exit status 1 Errors were encountered while processing: /var/cache/apt/archives/udev_0.063-1_i386.deb E: Sub-process /usr/bin/dpkg returned an error code (1)
which is mentioned here.So, after looking at the manual for
apt_preferences, I added
Package: udev Pin: version 0.056* Pin-Priority: 1001
to /etc/apt/preferences and reran
and all is well.I don't understand why someone would commit a package that relies on a kernel that isn't even in sid yet.
I was having a terrible time with Perforce 2005.1 (and 2004.2) changing the line ending characters on my bash shell scripts, DOS batch files, and other text files. This was causing my scripts to fail in one way or another. Also, several of my PHP scripts were malfunctioning as well. Web pages I wrote that allowed users to download Excel spreadsheets were now generating a spreadsheet that contained nothing but garbage.
I then discovered, that in order for Perforce to leave the line ending characters alone, I needed to change the ClientSpec and add the files with
and then change the ClientSpec back, and sync them with
To determine this, I wrote a small DOS batch file to analyse all possible combinations of LineEnd options, for both adding and syncing.
Here's the output from the program (edited slightly for clarity):
Add Sync file Result ------- ------- --------------- ------------------------------------- local local mac-cr.txt _ cr _ cr local local unix-lf.txt _ cr lf _ cr lf local local win-crlf.txt _ cr lf _ cr lf local mac mac-cr.txt _ cr _ cr local mac unix-lf.txt _ cr _ cr local mac win-crlf.txt _ cr _ cr local share mac-cr.txt _ cr _ cr local share unix-lf.txt _ lf _ lf local share win-crlf.txt _ lf _ lf local unix mac-cr.txt _ cr _ cr local unix unix-lf.txt _ lf _ lf local unix win-crlf.txt _ lf _ lf local win mac-cr.txt _ cr _ cr local win unix-lf.txt _ cr lf _ cr lf local win win-crlf.txt _ cr lf _ cr lf mac local mac-cr.txt _ cr lf _ cr lf mac local unix-lf.txt _ cr lf _ cr lf mac local win-crlf.txt _ cr lf cr lf _ cr lf cr lf mac mac mac-cr.txt _ cr lf _ cr lf mac mac unix-lf.txt _ cr lf _ cr lf mac mac win-crlf.txt _ cr lf cr lf _ cr lf cr lf mac share mac-cr.txt _ lf _ lf mac share unix-lf.txt _ lf _ lf
I have updated my list of BartPE plugins here.For the plugins listed as a patch of another plugin, a plugin.diff file is included detailing what was changed from the original plugin. Also see pebuilder.mak, a make file I created to automatically build and burn a BartPE disk with a single command.
Of course, before I run pebuilder.mak, I slipstream SP2 and apply all the latest security patches using xpsp2.mak.
You can also run Samba inside "normal" Windows, such as XP, 2003, or 2000. Details are here.
Command line sending of email, optionally with GnuPG encryption.
Email is a simple command-line program to send emails. It can be configured
to use either your sendmail installation or directly via SMTP.
It supports binary attachments, and a simple text based address book, with groups.
Also, if GnuPG is installed, it can digitally sign and encrypt outgoing emails.
I've created two new plugins to run cdrecord & mkisofs in BartPE.
1. cdrecord - cdrecord 2.01
This version includes version 2.01 of cdrecord compiled for native Windows, found at http://cdrtools.bootcd.ru (mirrored at http://stud3.tuwien.ac.at/~e0227529/mirror/). It requires msvcrt.dll to be in the path, which is true for BartPE.
2. cdrecord_cygwin - cdrecord 2.01.01a01 (includes a patched version of cdrecord to burn DVDs called dvdrecord)
This version includes version 2.01.01a01 of cdrecord compiled using Cygwin. It requires cygwin1.dll to be in the path. So you will either need to also include the Cygwin plugin, or copy cygwin1.dll to SYSTEM32 or another folder in the path.
If you aren't using Cygwin, and don't need to burn DVDs, use cdrecord, otherwise use cdrecord_cygwin.
To build the disk, all you need to type is:
$ make -f pebuilder.mak
The Makefile, and the supporting files are available as pebuilder-makefile.zip.
Of course, to run make, you will need to install Cygwin and select the make and wget packages. Alternatively, you could unzip cygwin-1.5.23.zip, which contains only the executables needed to run make.
It helps speed the build process by telling pebuilder to not build the .ISO. It then calls InfCacheBuilder, and then calls mkisofs. Finally, it calls cdrecord. A Windows version of cdrecord is available as cdrtools-latest.zip.
Also included is inirw.exe, a small C program I wrote to read and write .ini files. inirw.exe is also available separately (including source) as inirw.zip.
I installed DSPAM 3.0 at my ISP. It was pretty easy. I followed the instructions at http://dspam.nuclearelephant.com/text/README-3.6.7.txt and http://splodge.fluff.org/docs/single-user-dspam. Unfortunately, the later is for DSPAM 2 and needed some changes. Here's what I did.
Here's a simple Cygwin script to migrate files from a CVS repository to Perforce.
Make sure the directory you are in, is prefaced with /cygdrive, or cygpath gets confused.
#!/bin/bash # cvs2p4.sh REPOSITORIES="example1 example2" PWD=`cygpath -w \`pwd\`` p4 edit ... for repo in $REPOSITORIES do cvs export -r HEAD $repo done find . -type f -printf '"%P" ' | p4 -x - add p4 submit
After a long wait, I finally released Freebeer, A PHP application framework.
It needs a lot of more work, especially web site documentation, but at least its posted.