![]() |
||||||||||||||||||||||||||||
|
Welcome to Deadbeef.com
SearchLinksOpen SourceOtherFavoritesWho's Online?
Misc |
|
Archives for: 200612/27/06Does anyone use winamp for listening to podcasts?Winamp has two bundled plugins that look like they would be really great if they actually worked. Shoutcast wire: This plugin allows you to subscribe to podcasts. The subscribe part works, but then it falls apart.
Portable Music Player: This supports sync and fill of portable music devices. The "Send to *device*" menu item works great.
It shouldn't be so hard. All I want is something that will download podcasts, and let me listen to them on the computer or the portable device. What I do is subscribe to the feeds in google reader and save the mp3 files to the desktop, then I enqueue them in winamp and listen to them. Before I go home at the end of the day, I select all remaining files in the playlist and right-click to "Sent to portable". After it has transfered them to the mp3 player, then I delete them from the desktop. Seems like it should be easier. 11/22/06Logic is hardThere was a puzzle given on the Skeptics Guide podcast on 9/13/2006 and the solution they gave the next week bothered me. (They said it was ambiguous depending on how the question was phrased). I was googling around looking for other references to this problem and found these two: Marilyn Ignores the Obvious Regarding Probability of Boys by Herb Weiner
After reading Eldon's page, I realized how to rephrase the question to show the right process. Everyone is focusing on the 4 possibilities of children so let's set up the problem that way.
Clearly, the probability is 1/2 or 50%. More logic puzzlesHere is a long list of logic puzzles (no solutions posted yet). See how many you can figure out. 11/15/06Blank budget template as Excel spreadsheetMy wife and I are currently facilitators in Dave Ramsey's Financial Peace class and several people have asked me how I made my nice one page budget form. It is a Microsoft Excel file, and has everything squeezed in a very small space. Here is a blank version of my Budget Template. Update 11/15: I was asked for instructions on how to use this spreadsheet. It is very much like the paper budget forms. Column B is the category, and column C is how much you have budgeted for that month. Column D is how much you have spent so far this month, so at the beginning of the month these will be all zero. Now column D is all formulas, since I didn't want to do math every time I wrote a check. So if you look at the second sheet "Actuals" you see a similar chart showing the same first 3 columns. Starting in column D, you can just enter one check per cell. So for example if you have spent $5, $20, and $15 on food, go to the food line and put 5 in column D, 20 in E and 15 in F etc. The total will automatically show up on the "Budget" sheet in column D. Column E is simply a formula letting you know how much is left in that "envelope" for that category: i.e. Budgeted(C) - Actual(D). The balances at the bottom are just for checking your math: Balance C should always be zero if your budget is balanced. Balance D should be exactly the same as the balance in your checkbook. Balance E should be the same as Balance D but reversed. If it is not, then there is a broken formula in the spreadsheet somewhere. The tables on the right side: The next table is the debt snowball table. The first column is the name of the debt, then the original amount, which is not really needed except that when you call in to scream "I'm debt free", Dave will ask you how much debt you paid off, and if you didn't write it down you won't know. The next column is how much the current principle balance on that debt is, and then you have a nice little percent. The Upcoming table is a list of infrequent bills that I always forget about. I don't think that Dave has a form for this, but I needed it so that I remember to save up for big annual bills like car registration or quarterly insurance payments. The next section in the black box, is what I call the motivating statement. It is what encourages me to keep going, when I can look at the budget taped to the side of the fridge and see in huge letters: "We saved $3,963 and paid off $16,883 in debt" it keeps me focused on the goal. 11/11/06Mind the GapThis article by Paul Graham is an excellent argument that the gap between the poor and the rich is not something to be feared, but rather a sign of a health country. 11/06/06Mozy online backupI have been using this online backup service at mozy.com. It actually works really well, doesn't get in the way, and you can restore files from the web. If you use this link, then I get an extra 512MB quota also. (he he) The system is free, and you start with 1GB. Paid subscriptions are available if you need more space. The client tool that does the backups is available for Windows only (as far as I know). 10/08/06Knocking the exuberance out of employees"Knocking the exuberance out of employees" is a great little post over at Kathy Sierra's blog. I think I am probably one of those dangerous independent thinkers who gets into trouble for not going along with the party line. And I fear that the company I started with 12.5 years ago, which was very much more interested in creative thinkers, is becoming more and more of a robot factory. 09/25/06Cox.net is evilCox has decided to block all of my emails: ... while talking to mx1.west.cox.net.: Lovely. And of course there is no way to get this block removed it would appear. Cox.net support told me to email unblock.request@cox.net. Of course I CAN'T, since that email box doesn't exist. I have blocked *.cox.net in my blacklist: bl.deadbeef.com, perhaps that will help get their attention. Update 9/25/06 20:57: Something changed, now emails are working again. From my conversation with Tier 2 support, they claim the correct resolution is to email thisisnotspam@cox.net and abuse@cox.net requesting to be removed from the blacklist. The support department also seems to be unaware of the blacklist and wants to blame your mail server. 09/13/06Google joins in ALA's greatest lieGoogle is joining up with the American Library Association to celebrate Banned Books Week. There is only one problem. IT'S ALL A BIG LIE. You see, none of these books have actually been banned. They include books on their "banned" books list if even one person asked a book to be removed from one library or school. Since there are always crazy people in every community, this means that almost every book you can think of has been requested to be removed from some library someplace. 09/11/06My trip to climb Long's PeakI recently went to Colorado to climb Long's Peak. It was the most painful thing I have ever done. Perhaps next time I'll start with something smaller, perhaps a small hill. Photos here: http://www.flickr.com/groups/manalive2006/pool/ 08/15/06More blog search engine tipsThis article is an excellent set of short tips along with sample code for how to improve the search engine ranking of your blog. 08/08/06Reset Windows XP product keyHere is a handy tool to reset your product code on Windows XP, just in case you used a bootleg on your install and now you want to get legal (and stop that Windows Genuine Advantage), but you don't want to do a full reinstall. http://www.intelliadmin.com/blog/2006/04/updating-windows-xp-product-key.html 08/07/06I hate carsI hate cars. Don't get me wrong, I really like the freedom and mobility of having an automobile. I also am not one of those green types that thinks that cars are evil because they cause smog. I hate cars because I have a huge amount of money invested into something that I don't understand, and everyone is trying to take advantage of me at every turn. Today I just had $270 of preventive maintenance done on my minivan. Afterwards it occurred to me to look in the owner's manual and check if the dealer recommended service was the same as the manufacturer recommended service for that mileage level. It wasn't, too bad I didn't think to check the manual before I took it in, might have saved myself some money. It turns out that Dodge recommends a transmission flush at 60,000 miles, and the local dealer says 24,000. A big difference. And really I don't believe either one of them. The dealer is seeking to maximize their service revenue, and the manufacturer is looking to cover themselves from a lawsuit or something. Where is the independent research? Do cars even need oil changes? How often? How much does it help? I'd like to see the chart, where mean time to failure was plotted against frequency of oil changes. Perhaps it would be a better trade-off to only do oil changes every 12 months instead of every 3. This is why I hate cars. 07/31/06My LinkedIn PageI have a profile up at LinkedIn, which I am not sure if this is a good idea or not, but here it is. There is one nice feature, where you can upload your contacts and it will tell you which people are already in LinkedIn, so that you don't have to spam all of your friends for no reason. 07/28/06Pronet SEO tipsThe linked article is a really good list of tips on how to improve your search engine rankings. I have implemented two of their simpler suggestions, changing the page titles to "Post title - Deadbeef.com" instead of the silly "Deadbeef.com - Post Detail: Post title". I also put in a 301 redirect for deadbeef.com to www.deadbeef.com. We'll have to see if it makes any difference. The West Dodge Road expressway actually works!I came home today on the new West Dodge Road Expressway here in Omaha, and it only took 11 minutes. This was at the peak of rush hour too. Normally this would take me over 20 minutes. Other than being a big federal earmark ($80 million), it is turning out nice. It opened early, and has an immediate and positive impact on the traffic. Microsoft gets into the medical record businessThe linked article of note because both of the hospitals noted in the article are also using my software! I wonder if any of the 42 people that used to work at Washington Hospical Center and now work for Microsoft have heard of my employer? I had not heard of their product Azyxxi before this, but I would not be suprised if we are already sharing data with them via HL-7 messaging. Redirecting the output of a program to a file in .NET frameworkIt doesn't seem like this should be so hard, but it is. The Win32 CreateProcess API call has two nifty ways to do this. Now, we all know that in .NET using win32 api calls is naughty, so let's try using System.Diagnosis.Process.Start() instead. It has a very convient methods for capturing the output, but no way to set the handles to a file. Rats. So all we have left is a hack. Launch cmd.exe and have it redirect the output as described here: http://weblogs.asp.net/israelio/archive/2004/08/31/223447.aspx Code:
icky :( Oh and wait, the process exits immediatly, and the Process.ExitCode is always 1. Arg! Ok, so we need another hack. How about instead of starting cmd.exe we just run a bat file. Code:
Truly horrific, but it has the advantage of working! Of course this is subject to a race condition where foo.bat could be replaced with another file by a malicious process, and it's evil commands would be executed within our user context. I don't know how to fix that. Perhaps generate a random path name, create a directory, change the ACL's to prevent anyone from creating files in there, create the batch file in the directory, and then run it. Maybe. My wife has a blog nowMy lovely wife Amy has set up her own blog along with a few of her friends at http://www.teachingwithjoy.com. It will cover her favorite topics which are homeschooling & teaching in general. Right now she has her list of book recommendations up, but expect to see some nifty lesson plans and activities in the near future. 07/27/06Automatically remove invalid b2evolution usersIf your web site is anything like mine, you have spammers registering as users in the hope that they will have their spammy comments show up. Here is how you can get b2evolution 1.8 to automatically delete the users if they have not validated their email address within 7 days. First, copy this file to .../blogs/inc/CONTROL/cron/ Then edit .../blogs/inc/CONTROL/cron/crontab.php and add in these records: $cron_job_names:
'delete_users' => T_('Delete invalid users'),
$cron_job_params:
'delete_users' => array(
'ctrl' => 'cron/_delete_users.job.php', 'params' => NULL ), Then go to the Scheduler page in the backoffice, and add a new job. Now all your fake spam users will get autodeleted! 07/26/06"As per" is evil and should dieI was reminded again today about how much I dislike the phrase "as per". It is complete useless and unnecessary! I find that every usage could be expressed using either "as" or "per" or by leaving out the two words altogether. I have tried to find some references on the web, as to the correctness of this idiom, but I have not had much luck. Please leave a comment if you know of a definitive source for the evilness of this phrase. It's Evil: Noncommital: It's good: 07/18/06Fake ID's Save Lives in IraqI saw this article linked from Bruce Schneier's Blog. I always prickle at having to show my ID so this caught my attention. 07/17/06B2Evolution 1.8 releasedThe new version of b2evolution is out for download and I have moved over my blog. Changes I had to make:
B2Evolution: Table of Contents pluginHere is a plugin for B2Evolution 1.6, that creates a renders the special tag: This way you can create a menu post that displays posts from a certain category. This is handy, if you use b2evolution as a content system for a traditional web site, not just as a blog. Here is a sample use. For the top 5 posts in the B2evolution category, and the first 10 words from each post, showing dates; use:
The blog's or the skin's css file can be used to customize the display of the table of contents. Download the file and save it in your b2evolution plugins directory. Update 1/30/2006: Download link fixed 05/10/06It's not about the big ideaI have been thinking about a big idea for something to go and do to make myself either rich, famous, or both. But it is a hopeless task, I'm just not full of brilliant ideas! 02/21/06Subversion branch processMaintaining a branch in subversion is harder than it should be. I have written a little helper script to make it easier to maintain a branch. The problem is that you need to keep your branch up to date with trunk so that you can commit back to trunk someday. Here is my process: Create the branch: Checkout the branch to a working copy: Create some properties to keep your place: To get new changes from trunk applied to the branch, just run this script: #!/bin/sh
set -e -x
trunk_url="`svn propget trunk_url`"
new_rev=`svn info "$trunk_url" | awk '/^Last Changed Rev:/ {print $4}'`
old_rev=`svn propget synced_rev`
if [ "$new_rev" != "$old_rev" ] ; then
svn log -r $old_rev:$new_rev "$trunk_url" >>MERGE_LOG.txt
svn merge -r $old_rev:$new_rev "$trunk_url" .
svn propset synced_rev $new_rev .
fi02/19/06SSHDFilterSSH dictionary attacks are a big problem. I posted earlier a script that will scan the logs and block IP addresses that attempt many logins. (ssh_complain) However SSHDFilter is a script that watches the logs live and immediatly blocks IP addresses as soon as they attempt one illegal username or too many failed passwords on legal users. 01/23/06Auto-blocking and emailing hosts that attack via ssh or ftpI have written a script, which is intended to be run from cron every few minutes, which will block hosts that try dictionary attacks on your unix server. You will need to tweak this for your own use. The script sends an email to the network administrator, then adds the ip address to /etc/hosts.deny. It works for me, but your mileage may vary. Uses: mutt, ntpstat and the whois service at whois.deadbeef.com This is three scripts. auto_send_ssh_complaints: Scans log files for attacks, and invokes the proper script to send the email. #!/bin/sh
# Fill in your own whitelisted hosts here
whitelist="127.0.0.1 1.2.3.4 `host home.example.com | sed -e 's/[^0-9]*//'`"
sed -e '/sshd\[[0-9]*\]: Failed password/!d' \
-e 's/.*Failed password for.*from //' \
-e 's/ port.*//' /var/log/secure | sort | uniq -c | \
while read info
do
set -- $info
count=$1
host=$2
whitelisted=0
host=`echo $host | sed -e 's/::ffff://'`
number_of_usernames=`sed -e '/sshd\[[0-9]*\]: Failed password.*from '$host'/!d' -e 's/.*Failed password for //' -e 's/ from .*//' /var/log/secure | sort -u | wc -l`
for white in $whitelist ; do
if [ "$white" = "$host" ] ; then
whitelisted=1
fi
done
if [ "$whitelisted" = "1" ] ; then
echo "$count attempts from WHITELISTED $host"
elif grep -q "ALL:$host" /etc/hosts.deny ; then
: #echo "$host is blacklisted"
else
#echo "$count attempts from $host"
#host $host
if [ "$count" -gt "14" -o "$number_of_usernames" -gt "4" ] ; then
/root/bin/ssh_complain $host
else
: #echo "WARNING: $host is not blacklisted"
fi
fi
done
sed -e '/vsftpd(pam_unix)\[[0-9]*\]: authentication failure/!d' \
-e 's/.*rhost=.*from //' \
-e 's/ user=.*//' /var/log/messages | sort | uniq -c | \
while read info
do
set -- $info
count=$1
host=$2
whitelisted=0
for white in $whitelist ; do
if [ "$white" = "$host" ] ; then
whitelisted=1
fi
done
if [ "$whitelisted" = "1" ] ; then
echo "$count attempts from WHITELISTED $host"
elif grep -q "ALL:$host" /etc/hosts.deny ; then
: #echo "$host is blacklisted"
else
#echo "$count attempts from $host"
#host $host
if [ "$count" -gt "25" ] ; then
/root/bin/ftp_complain $host
else
: #echo "WARNING: $host is not blacklisted"
fi
fi
doneftp_complain: Sends email about ftp attacks. #!/bin/sh
while [ "$1" != "" ] ; do
ipaddr=$1
shift
echo "Sending FTP complaint on $ipaddr"
echo "Getting email addresses"
emails="`whois "$ipaddr@whois.deadbeef.com" | awk '/^[^\[]/ {print $1}'`"
echo "Getting logs"
fgrep "$ipaddr" /var/log/secure* /var/log/messages* >$ipaddr.txt
echo "Getting count"
count=`grep 'vsftpd.*authentication failure.*rhost='"$ipaddr" /var/log/messages* | wc -l | sed 's/ *//'`
echo "Count=$count"
if [ "$emails" = "" ] ; then
echo "No email addresses"
else
echo "Sending email"
cat <<EOF | mutt -a $ipaddr.txt -s "Excessive FTP attempts from $ipaddr" $emails root@example.com
My host server.example.com (1.2.3.4) has received roughly $count
attempts to login via the FTP protocol from your host at $ipaddr. I have
attached the relevant portions of my logfiles. All times are in CST/CDT.
`ntpstat`
Thank you for your understanding.
admin@example.com
EOF
fi
if grep "^ALL:$ipaddr\$" /etc/hosts.deny ; then
echo "Already in blocked list"
else
echo "Adding $ipaddr to blocked list"
echo "ALL:$ipaddr" >>/etc/hosts.deny
fi
donessh_complain: Sends email about ssh attacks #!/bin/sh
cd /tmp
while [ "$1" != "" ] ; do
ipaddr=$1
shift
echo "Sending SSH complaint on $ipaddr"
echo "Getting email addresses"
emails="`whois "$ipaddr@whois.deadbeef.com" | awk '/^[^\[]/ {print $1}'`"
echo "Getting logs"
fgrep "$ipaddr" /var/log/secure* /var/log/messages* >$ipaddr.txt
echo "Getting count"
count=`grep 'Failed password for.*from '"$ipaddr"'.*ssh2' /var/log/secure* | wc -l | sed 's/ *//'`
echo "Count=$count"
if [ "$emails" = "" ] ; then
echo "No email addresses"
else
echo "Sending email"
cat <<EOF | mutt -a $ipaddr.txt -s "Excessive SSH attempts from $ipaddr" $emails root@sageconspiracy.com
My host server.example.com (1.2.3.4) has received roughly $count
attempts to login via the SSH protocol from your host at $ipaddr. I have
attached the relevant portions of my logfiles. All times are in CST/CDT.
`ntpstat`
Thank you for your understanding.
admin@example.com
EOF
fi
if grep "^ALL:$ipaddr\$" /etc/hosts.deny ; then
echo "Already in blocked list"
else
echo "Adding $ipaddr to blocked list"
echo "ALL:$ipaddr" >>/etc/hosts.deny
fi
done01/21/06Installing b2evolution in a virtual domain environmentSteps to install b2evolution for all domains on your server.
01/05/06ffcall and Windows XP Data Execution PreventionSummary: Details: What is Data Execution Prevention?In Windows Server 2003 & Windows XP SP2, Microsoft added a feature (if you have the hardware to support it), which will prevent the execution of code in areas of memory marked for data. So specifically this protects against a class of buffer overrun attacks. I know you are saying, "So what, I don't have self modifying code" that is what I thought too. So go and change your settings and turn on DEP. Go do it now, I'll wait here..... Ok, perhaps your program still runs fine, but mine didn't. Turns out that the GNUStep implementation of NSInvocation uses the ffcall library to make the dynamic function calls. The ffcall implementaion of trampolines (basically a function pointer with context) allocates some memory and writes some opcodes in to it to set up the context state then JMP to the real function. Oops, that is self modifying code and doesn't work any more. The Solution: Windows doesn't actually ban all execution in writable pages, just in data pages. Most unix OSes have similar limitations. We just need to tell Windows that we'd like a writable data page to put our code into. This is done with the VirtualAlloc function. For example:
|
|
Sponsored LinksTop Articles
Categories
Archives
|
|
|||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||