<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>ben bernier's badass blog</title>
	<atom:link href="http://benbernier.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://benbernier.com</link>
	<description>random blog about whatever i choose</description>
	<pubDate>Thu, 02 Sep 2010 21:40:29 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>windows xp BSOD Stop 0&#215;0000007E</title>
		<link>http://benbernier.com/?p=179</link>
		<comments>http://benbernier.com/?p=179#comments</comments>
		<pubDate>Thu, 02 Sep 2010 21:40:29 +0000</pubDate>
		<dc:creator>ben</dc:creator>
		
		<category><![CDATA[documentation]]></category>

		<category><![CDATA[helpful links]]></category>

		<category><![CDATA[rants]]></category>

		<category><![CDATA[winbloze]]></category>

		<guid isPermaLink="false">http://benbernier.com/?p=179</guid>
		<description><![CDATA[so after an architecture change of a client&#8217;s server&#8217;s pc during a disaster recovery middle of business day, i was forced to learn a lot about migrating windows xp install to and from intel and amd architectures.
i found the repair to be sufficient moving from amd to intel, but left me with a BSOD when [...]]]></description>
			<content:encoded><![CDATA[<p>so after an architecture change of a client&#8217;s server&#8217;s pc during a disaster recovery middle of business day, i was forced to learn a lot about migrating windows xp install to and from intel and amd architectures.</p>
<p>i found the repair to be sufficient moving from amd to intel, but left me with a BSOD when going from intel to amd.</p>
<p>well like most microsoft problems, this error has a bajillion reasons as to why and finding pertinent information was difficult. i finally stumbled across this microsoft kb artice (<a href="http://support.microsoft.com/kb/953356" target="_blank">http://support.microsoft.com/kb/953356</a>) which instructed that when the repair cd was created via an image that was intel-based, it needs to have a registry key disabled in order to boot on amd.</p>
<p>fortunately, since even safe mode is not accessible during a half-complete repair, the kb article even documented how to disable the feature via the recovery console of an install cd</p>
<p>i cite the kb article here:</p>
<p>To work around this issue, run the recovery console by using the Windows  XP CD. Then, select the recovery option. To run the Recovery Console  from the Windows XP startup disk or from the Windows XP CD, follow these  steps:</p>
<ol>
<li>Insert the Windows XP startup disk in the floppy disk  drive. Or, insert the Windows XP CD in the CD drive. Then, restart the  computer.
<p><strong>Note</strong> If you are prompted, click to select any  options that are required to start the computer from the CD drive.</li>
<li>When  the &#8220;Welcome to Setup&#8221; screen appears, press R to start the Recovery  Console.</li>
<li>If you have a dual-boot computer or a multiple-boot  computer, select the installation that you want to access from the  Recovery Console.</li>
<li>When you are prompted, type the administrator  password.
<p><strong>Note</strong> Press ENTER if the administrator password  is blank.</li>
<li>At the Recovery Console command prompt, type the  following command, and then press ENTER:
<div class="indent"><span class="userInput">disable intelppm</span></div>
</li>
<li>To exit the  Recovery Console and to restart the computer, type <span class="userInput">exit</span> at the Recovery Console command prompt,  and then press ENTER.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://benbernier.com/?feed=rss2&amp;p=179</wfw:commentRss>
		</item>
		<item>
		<title>remove stale locks vmware server 2</title>
		<link>http://benbernier.com/?p=177</link>
		<comments>http://benbernier.com/?p=177#comments</comments>
		<pubDate>Fri, 02 Jul 2010 20:32:05 +0000</pubDate>
		<dc:creator>ben</dc:creator>
		
		<category><![CDATA[documentation]]></category>

		<category><![CDATA[quick hacks]]></category>

		<guid isPermaLink="false">http://benbernier.com/?p=177</guid>
		<description><![CDATA[so my virtual machine server went down in my office the other day, and the auto startup for a specific machine failed because there was a lock file present from before the power failure (time to replace my ups)
it was easy enough to fix by removing the folder located at:
/var/lib/vmware/Virtual\ Machines/{vm-name}/{vm-disk-file-name}.vmdk.lock/
for me the command was:
# [...]]]></description>
			<content:encoded><![CDATA[<p>so my virtual machine server went down in my office the other day, and the auto startup for a specific machine failed because there was a lock file present from before the power failure (time to replace my ups)</p>
<p>it was easy enough to fix by removing the folder located at:</p>
<p>/var/lib/vmware/Virtual\ Machines/{vm-name}/{vm-disk-file-name}.vmdk.lock/</p>
<p>for me the command was:</p>
<p># rm -vfr /var/lib/vmware/Virtual\ Machines/nataile/natalie-hardDisk1.vmdk.lock/</p>
]]></content:encoded>
			<wfw:commentRss>http://benbernier.com/?feed=rss2&amp;p=177</wfw:commentRss>
		</item>
		<item>
		<title>reparse and remount fstab</title>
		<link>http://benbernier.com/?p=175</link>
		<comments>http://benbernier.com/?p=175#comments</comments>
		<pubDate>Thu, 01 Jul 2010 23:52:06 +0000</pubDate>
		<dc:creator>ben</dc:creator>
		
		<category><![CDATA[documentation]]></category>

		<category><![CDATA[quick hacks]]></category>

		<guid isPermaLink="false">http://benbernier.com/?p=175</guid>
		<description><![CDATA[after adding a  usb drive to fstab i reloaded it and remounted when needed using the following command:
# mount - a -o remount
]]></description>
			<content:encoded><![CDATA[<p>after adding a  usb drive to fstab i reloaded it and remounted when needed using the following command:</p>
<p># mount - a -o remount</p>
]]></content:encoded>
			<wfw:commentRss>http://benbernier.com/?feed=rss2&amp;p=175</wfw:commentRss>
		</item>
		<item>
		<title>funny stuff!</title>
		<link>http://benbernier.com/?p=173</link>
		<comments>http://benbernier.com/?p=173#comments</comments>
		<pubDate>Mon, 28 Jun 2010 13:51:02 +0000</pubDate>
		<dc:creator>ben</dc:creator>
		
		<category><![CDATA[inspiration &amp; quotes]]></category>

		<category><![CDATA[moods]]></category>

		<guid isPermaLink="false">http://benbernier.com/?p=173</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<img title="parenting" src="http://verydemotivational.files.wordpress.com/2010/02/129098659965774307.jpg" alt="youre doing it wrong!" width="450" height="544" />
]]></content:encoded>
			<wfw:commentRss>http://benbernier.com/?feed=rss2&amp;p=173</wfw:commentRss>
		</item>
		<item>
		<title>unpack multiple files at once using xargs</title>
		<link>http://benbernier.com/?p=171</link>
		<comments>http://benbernier.com/?p=171#comments</comments>
		<pubDate>Thu, 10 Jun 2010 16:55:14 +0000</pubDate>
		<dc:creator>ben</dc:creator>
		
		<category><![CDATA[documentation]]></category>

		<category><![CDATA[quick hacks]]></category>

		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://benbernier.com/?p=171</guid>
		<description><![CDATA[how to upack all tarball gunzips .tar.gz in a given directory at a time
ls *.tar.gz &#124; xargs  -t   -I {} tar -zxvf  {} 
*note: after the -t it is a -I as in -(capital)i
substitute your flavors at -zxvf and adjust file list at the ls command before the pipe
]]></description>
			<content:encoded><![CDATA[<p>how to upack all tarball gunzips .tar.gz in a given directory at a time</p>
<p><span style="display: block; padding-left: 6em;"><span>ls *.tar.gz | xargs  -t   -I {} tar -zxvf  {} </span></span></p>
<p>*note: after the -t it is a -I as in -(capital)i</p>
<p>substitute your flavors at -zxvf and adjust file list at the ls command before the pipe</p>
]]></content:encoded>
			<wfw:commentRss>http://benbernier.com/?feed=rss2&amp;p=171</wfw:commentRss>
		</item>
		<item>
		<title>compiling from source against 2.6.33</title>
		<link>http://benbernier.com/?p=168</link>
		<comments>http://benbernier.com/?p=168#comments</comments>
		<pubDate>Sat, 20 Mar 2010 19:36:58 +0000</pubDate>
		<dc:creator>ben</dc:creator>
		
		<category><![CDATA[documentation]]></category>

		<category><![CDATA[quick hacks]]></category>

		<guid isPermaLink="false">http://benbernier.com/?p=168</guid>
		<description><![CDATA[i screwed up my slackware install on my laptop, did a reinstall, realized i installed 32-bit and decided to roll with it. everything i have gone to install out of the official tree has needed some patching due to the new kernel.
apparently the new kernel (2.6.33) no longer generates a file named /usr/src/`uname -r`/linux/autoconf.h and [...]]]></description>
			<content:encoded><![CDATA[<p>i screwed up my slackware install on my laptop, did a reinstall, realized i installed 32-bit and decided to roll with it. everything i have gone to install out of the official tree has needed some patching due to the new kernel.</p>
<p>apparently the new kernel (2.6.33) no longer generates a file named /usr/src/`uname -r`/linux/autoconf.h and instead generates one named /usr/src/`uname -r`/generated/autoconf.h &#8211;&gt; what this means to compiling from source is that all references to the linux/autoconf.h must be redirected to generated/autoconf.h</p>
<p>trust me that this is a major headache that isn&#8217;t very well documented yet</p>
]]></content:encoded>
			<wfw:commentRss>http://benbernier.com/?feed=rss2&amp;p=168</wfw:commentRss>
		</item>
		<item>
		<title>remove files by date - bash</title>
		<link>http://benbernier.com/?p=166</link>
		<comments>http://benbernier.com/?p=166#comments</comments>
		<pubDate>Wed, 10 Mar 2010 21:14:52 +0000</pubDate>
		<dc:creator>ben</dc:creator>
		
		<category><![CDATA[documentation]]></category>

		<category><![CDATA[quick hacks]]></category>

		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://benbernier.com/?p=166</guid>
		<description><![CDATA[find /path/to/files/* -mtime +5 -exec rm {} \;
where +5=older than 5 days
]]></description>
			<content:encoded><![CDATA[<p>find /path/to/files/* -mtime +5 -exec rm {} \;</p>
<p>where +5=older than 5 days</p>
]]></content:encoded>
			<wfw:commentRss>http://benbernier.com/?feed=rss2&amp;p=166</wfw:commentRss>
		</item>
		<item>
		<title>arduino, x10, buttons, and lcd</title>
		<link>http://benbernier.com/?p=164</link>
		<comments>http://benbernier.com/?p=164#comments</comments>
		<pubDate>Sun, 22 Nov 2009 02:50:09 +0000</pubDate>
		<dc:creator>ben</dc:creator>
		
		<category><![CDATA[documentation]]></category>

		<category><![CDATA[hardware]]></category>

		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://benbernier.com/?p=164</guid>
		<description><![CDATA[this code is one night old. more to come from it but it&#8217;s not much now:
#include &#60;LiquidCrystal.h&#62;
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(2, 3, 4, 5, 6, 7);
/*
brb 20091121
control 2 x10 devices (4 &#38;2) via momentary switches on pins 10
and 12. x10 interface on pins 8 and 9 and a [...]]]></description>
			<content:encoded><![CDATA[<p>this code is one night old. more to come from it but it&#8217;s not much now:</p>
<p>#include &lt;LiquidCrystal.h&gt;<br />
// initialize the library with the numbers of the interface pins<br />
LiquidCrystal lcd(2, 3, 4, 5, 6, 7);<br />
/*<br />
brb 20091121<br />
control 2 x10 devices (4 &amp;2) via momentary switches on pins 10<br />
and 12. x10 interface on pins 8 and 9 and a 16&#215;2 lcd on 2, 3,<br />
4, 5, 6, &amp; 7. messages will be printed to the serial console and<br />
to the lcd screen</p>
<p>hold down both buttons to shut all units off</p>
<p>*/<br />
#include &lt;x10.h&gt;<br />
#include &lt;x10constants.h&gt;</p>
<p>#define zcPin 8<br />
#define dataPin 9</p>
<p>const int buttonPin2 = 10;<br />
const int buttonPin = 12;     // the number of the pushbutton pin<br />
const int ledPin =  13;      // the number of the LED pin<br />
int buttonState = 0;<br />
int buttonState2 = 0;         // variable for reading the pushbutton status<br />
int buttoncount = 0;<br />
int buttoncount2 = 0;<br />
int resetcounterflag = 0;</p>
<p>// set up a new x10 instance:<br />
x10 myHouse =  x10(zcPin, dataPin);</p>
<p>void setup() {<br />
Serial.begin(9600);<br />
// set up the LCD&#8217;s number of rows and columns:<br />
lcd.begin(16, 2);<br />
// Print a message to the LCD.<br />
lcd.print(&#8221;poweredByCoffee&#8221;);<br />
// initialize the LED pin as an output:<br />
pinMode(ledPin, OUTPUT);<br />
// initialize the pushbutton pin as an input:<br />
pinMode(buttonPin, INPUT);<br />
pinMode(buttonPin2, INPUT);<br />
}</p>
<p>void loop() {<br />
buttonState = digitalRead(buttonPin);<br />
buttonState2 = digitalRead(buttonPin2);<br />
// check if the pushbutton is pressed.<br />
// if it is, the buttonState is HIGH:<br />
if (buttonState == HIGH) {<br />
delay(100);<br />
if (buttonState2 == HIGH){<br />
allUnitsOff();<br />
}<br />
else if (buttoncount == 0) {<br />
digitalWrite(ledPin, LOW);<br />
lcd.setCursor(0, 0);<br />
// print the light status:<br />
lcd.print(&#8221;Desk OFF  &#8220;);<br />
Serial.println(&#8221;Desk Light off:&#8221;);<br />
// send a &#8220;lights off&#8221; command to workbench light 1 time:<br />
myHouse.write(A, UNIT_4, 1);<br />
myHouse.write(A, OFF, 1);<br />
lcd.setCursor(12, 0);<br />
// print the number of seconds since reset:<br />
lcd.print(millis()/1000);<br />
}<br />
buttoncount++;<br />
delay(200);<br />
if (resetcounterflag == 1){<br />
resetcounterflag = 0;<br />
buttoncount=0;<br />
buttoncount2=0;<br />
}<br />
}<br />
if(buttoncount == 2){<br />
digitalWrite(ledPin, HIGH);<br />
buttoncount=0;<br />
lcd.setCursor(0, 0);<br />
// print the light status:<br />
lcd.print(&#8221;Desk ON   &#8220;);<br />
Serial.println(&#8221;Desk Light on:&#8221;);<br />
// send a &#8220;lights on&#8221; command to workbench light 1 time:<br />
myHouse.write(A, UNIT_4, 1);<br />
myHouse.write(A, ON, 1);<br />
lcd.setCursor(12, 0);<br />
// print the number of seconds since reset:<br />
lcd.print(millis()/1000);<br />
delay(200);<br />
}<br />
if (buttonState2 == HIGH) {<br />
delay(100);<br />
if (buttonState == HIGH){<br />
allUnitsOff();<br />
}<br />
else if (buttoncount2 == 0) {<br />
digitalWrite(ledPin, LOW);<br />
lcd.setCursor(0, 0);<br />
// print the light status:<br />
lcd.print(&#8221;LR OFF     &#8220;);<br />
Serial.println(&#8221;Living Room off:&#8221;);<br />
// send a &#8220;lights off&#8221; command to workbench light 1 time:<br />
myHouse.write(A, UNIT_2, 1);<br />
myHouse.write(A, OFF, 1);<br />
lcd.setCursor(12, 0);<br />
// print the number of seconds since reset:<br />
lcd.print(millis()/1000);<br />
}<br />
buttoncount2++;<br />
delay(200);<br />
if (resetcounterflag == 1){<br />
resetcounterflag = 0;<br />
buttoncount=0;<br />
buttoncount2=0;<br />
}<br />
}<br />
if(buttoncount2 == 2){<br />
digitalWrite(ledPin, HIGH);<br />
buttoncount2=0;<br />
lcd.setCursor(0, 0);<br />
// print the light status:<br />
lcd.print(&#8221;LR ON      &#8220;);<br />
Serial.println(&#8221;Living Room on:&#8221;);<br />
// send a &#8220;lights on&#8221; command to workbench light 1 time:<br />
myHouse.write(A, UNIT_2, 1);<br />
myHouse.write(A, ON, 1);<br />
lcd.setCursor(12, 0);<br />
// print the number of seconds since reset:<br />
lcd.print(millis()/1000);<br />
delay(200);<br />
}<br />
//do nothing<br />
lcd.setCursor(0, 1);<br />
lcd.print(&#8221;  benduino x10&#8243;);<br />
}</p>
<p>void allUnitsOff() {<br />
digitalWrite(ledPin, LOW);<br />
lcd.setCursor(0, 0);<br />
// print the light status:<br />
lcd.print(&#8221;ALL UNITS OFF&#8221;);<br />
Serial.println(&#8221;All Units off:&#8221;);<br />
// send a &#8220;lights off&#8221; command to workbench light 1 time:<br />
myHouse.write(A, ALL_UNITS_OFF, 1);<br />
lcd.setCursor(12, 0);<br />
// print the number of seconds since reset:<br />
lcd.print(millis()/1000);<br />
resetcounterflag=1;<br />
delay(100);<br />
return;<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://benbernier.com/?feed=rss2&amp;p=164</wfw:commentRss>
		</item>
		<item>
		<title>wep cracking with aircrack-ng</title>
		<link>http://benbernier.com/?p=162</link>
		<comments>http://benbernier.com/?p=162#comments</comments>
		<pubDate>Mon, 26 Oct 2009 00:58:50 +0000</pubDate>
		<dc:creator>ben</dc:creator>
		
		<category><![CDATA[documentation]]></category>

		<category><![CDATA[hardware]]></category>

		<category><![CDATA[quick hacks]]></category>

		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://benbernier.com/?p=162</guid>
		<description><![CDATA[had to get a new usb adapter that was capable of inject and monitor modes. took a chance with a netgear usb wg111 at best buy, it happened to be ralink based (wg111v3). then i installed the aircrack-ng suite and began testing my network with the commands below
scan for available networks using card that can [...]]]></description>
			<content:encoded><![CDATA[<p>had to get a new usb adapter that was capable of inject and monitor modes. took a chance with a netgear usb wg111 at best buy, it happened to be ralink based (wg111v3). then i installed the aircrack-ng suite and began testing my network with the commands below</p>
<p>scan for available networks using card that can do injection<br />
# iwlist wlan0 scan<br />
start airmon-ng on the appropriate channel and interface<br />
# airmon-ng start wlan0 6<br />
do an injection test for good measure<br />
# aireplay-ng -9 wlan0<br />
do an injection test against target network<br />
# aireplay-ng -9 -e {ssid here} -a {mac of ap here} wlan0<br />
start the airodump *needs dedicated terminal or backgrounding of process<br />
# airodump-ng -c 6 &#8211;bssid {mac of ap here} -w output wlan0<br />
begin probe *needs dedicated terminal or backgrounding of process<br />
# aireplay-ng -1 6 -e {essid here} -a {mac of ap here} -h {mac of associated client or own mac} wlan0<br />
begin injection *needs dedicated terminal or backgrounding of process<br />
# aireplay-ng -3 -b {mac of ap here} -h {mac of associated client or own mac} wlan0<br />
begin cracking *needs dedicated terminal or backgrounding of process<br />
# aircrack-ng -z -b {mac of ap here} output*.cap</p>
<p>just let those things run until it gives you the key</p>
<p>moral of the story: never use WEP</p>
]]></content:encoded>
			<wfw:commentRss>http://benbernier.com/?feed=rss2&amp;p=162</wfw:commentRss>
		</item>
		<item>
		<title>found the prank site, need the pranker</title>
		<link>http://benbernier.com/?p=160</link>
		<comments>http://benbernier.com/?p=160#comments</comments>
		<pubDate>Mon, 19 Oct 2009 15:08:02 +0000</pubDate>
		<dc:creator>ben</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://benbernier.com/?p=160</guid>
		<description><![CDATA[http://www.hoaxcall.com/flatrate_103_a.html
my phone number was even listed as having been called in the last 21 days and would not let me recall it.
i called our office and that prank call was definitely it. the voice was the same and the interactions possible are the same.  all thats left now is finding the person who did it [...]]]></description>
			<content:encoded><![CDATA[<p>http://www.hoaxcall.com/flatrate_103_a.html</p>
<p>my phone number was even listed as having been called in the last 21 days and would not let me recall it.</p>
<p>i called our office and that prank call was definitely it. the voice was the same and the interactions possible are the same.  all thats left now is finding the person who did it and pranking them my way: i.e. asterisk autoredialer for 24 hours.</p>
]]></content:encoded>
			<wfw:commentRss>http://benbernier.com/?feed=rss2&amp;p=160</wfw:commentRss>
		</item>
		<item>
		<title>unknown numbers</title>
		<link>http://benbernier.com/?p=158</link>
		<comments>http://benbernier.com/?p=158#comments</comments>
		<pubDate>Sun, 18 Oct 2009 20:40:13 +0000</pubDate>
		<dc:creator>ben</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://benbernier.com/?p=158</guid>
		<description><![CDATA[so i got a call from an unknown number today. I answered it, which is completely contradictory to my instinct. There was an attractive sounding woman who had a very familiar voice who said &#8220;Hi&#8221; and that I had to guess who it was. I asked them to please not make me do that (my [...]]]></description>
			<content:encoded><![CDATA[<p>so i got a call from an unknown number today. I answered it, which is completely contradictory to my instinct. There was an attractive sounding woman who had a very familiar voice who said &#8220;Hi&#8221; and that I had to guess who it was. I asked them to please not make me do that (my hearing is bad and I don&#8217;t tie it to memory very well). I guessed once, a little bit of silence later I was informed that I was wrong. The hint was provided that &#8220;we hadn&#8217;t talked in a while,&#8221; but thats so vague it could mean any time period really. I guessed again. Wrong. &#8220;Two more guesses,&#8221; I was told. I mumbled something -definitely not a name or word- and I heard a yes. Great. &#8220;Yes?&#8221; I said. It was reiterated to me. I said how are you and it was awkward. I was obviously supposed to be more excited than I was, but mostly I was annoyed to have to play that game. Phone number was blocked so my phone book/contact list was of no help. She said bye and then hung up&#8230;conversation could have gone completely differently if I had been just told who it was. Worst part is I probably wanted to talk with them too&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://benbernier.com/?feed=rss2&amp;p=158</wfw:commentRss>
		</item>
		<item>
		<title>Motion Detection Arduino Code</title>
		<link>http://benbernier.com/?p=155</link>
		<comments>http://benbernier.com/?p=155#comments</comments>
		<pubDate>Sun, 18 Oct 2009 17:03:13 +0000</pubDate>
		<dc:creator>ben</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://benbernier.com/?p=155</guid>
		<description><![CDATA[
/*
motion detection code for parallax module from radio shack
**20091015 brb**
basic motion/infrared detection software
**20091015 brb**
add similtaneous green led blinks during motion poll
parts:
3 leds (2 green, 1 red)
1 parallax PIR sensor
on detection of any motion, binary signal on digital pin 8
changes, which causes led on digital pin 5 to light
while motion is not being detected, blink the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://benbernier.com/wp-content/uploads/photo-0008.jpg"><img class="alignnone size-medium wp-image-156" title="photo-0008" src="http://benbernier.com/wp-content/uploads/photo-0008-300x240.jpg" alt="" width="300" height="240" /></a></p>
<p>/*<br />
motion detection code for parallax module from radio shack<br />
**20091015 brb**<br />
basic motion/infrared detection software<br />
**20091015 brb**<br />
add similtaneous green led blinks during motion poll</p>
<p>parts:</p>
<p>3 leds (2 green, 1 red)</p>
<p>1 parallax PIR sensor</p>
<p>on detection of any motion, binary signal on digital pin 8<br />
changes, which causes led on digital pin 5 to light</p>
<p>while motion is not being detected, blink the pins leds on<br />
digital pins 6 and 11. this pause is accomplished by<br />
incrementing a loop timer from 100 to 200 and then reseting<br />
it to zero every 100 intervals (currently 10 miliseconds).<br />
every whole second the led pins alternate being on and off</p>
<p>i reccomend setting the motion detection to H output using<br />
the jumpers on its board; this will make it continuously<br />
trigger the event on constant motion</p>
<p>*/<br />
int ledPin = 5;<br />
int ledPinG1 = 6;<br />
int ledPinG2 = 11;<br />
int modectPin = 8;<br />
int pinin = 0;<br />
int counter = 100;</p>
<p>void setup()<br />
{<br />
pinMode(ledPin, OUTPUT);<br />
pinMode(ledPinG1, OUTPUT);<br />
pinMode(ledPinG2, OUTPUT);<br />
pinMode(modectPin, INPUT);<br />
}</p>
<p>void loop()<br />
{<br />
pinin = digitalRead(modectPin);<br />
while (pinin == 0) {<br />
digitalWrite(ledPin, LOW);<br />
counter = counter + 1;<br />
if(counter == 100){<br />
digitalWrite(ledPinG2, HIGH);<br />
digitalWrite(ledPinG1, LOW);<br />
}<br />
if(counter == 200){<br />
digitalWrite(ledPinG2, LOW);<br />
digitalWrite(ledPinG1, HIGH);<br />
counter = 0;<br />
}<br />
delay(10);<br />
pinin = digitalRead(modectPin);<br />
}<br />
digitalWrite(ledPinG2, LOW);<br />
digitalWrite(ledPinG1, LOW);<br />
digitalWrite(ledPin, HIGH);<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://benbernier.com/?feed=rss2&amp;p=155</wfw:commentRss>
		</item>
		<item>
		<title>fop 0.95 on slackware64</title>
		<link>http://benbernier.com/?p=148</link>
		<comments>http://benbernier.com/?p=148#comments</comments>
		<pubDate>Fri, 09 Oct 2009 15:13:44 +0000</pubDate>
		<dc:creator>ben</dc:creator>
		
		<category><![CDATA[documentation]]></category>

		<category><![CDATA[helpful links]]></category>

		<guid isPermaLink="false">http://benbernier.com/?p=148</guid>
		<description><![CDATA[# slackpkg update
# slackpkg install jdk
# cd /usr/local/src
# wget http://archive.apache.org/dist/ant/source/apache-ant-1.6.5-src.tar.gz
# tar zxvf apache-ant-1.6.5-src.tar.gz
# cd apache-ant-1.6.5
#./build.sh
# cd ..
# wget http://apache.siamwebhosting.com/xmlgraphics/fop/source/fop-0.95-src.tar.gz
# tar zxvf fop-0.95-src.tar.gz
# cd fop-0.95
# /usr/local/src/apache-ant-1.6.5/dist/bin/ant
now you have a 64 bit fop&#8230;or you can download it here:
drunkensailor.org/software/fop-0.95-slackware64.tar.gz
i have my ant available here:
drunkensailor.org/software/ant-1.6.5-slackware64.tar.gz
*both of these are just meant to be unpacked where you want to run them [...]]]></description>
			<content:encoded><![CDATA[<p># slackpkg update</p>
<p># slackpkg install jdk</p>
<p># cd /usr/local/src</p>
<p># wget http://archive.apache.org/dist/ant/source/apache-ant-1.6.5-src.tar.gz</p>
<p># tar zxvf apache-ant-1.6.5-src.tar.gz</p>
<p># cd apache-ant-1.6.5</p>
<p>#./build.sh</p>
<p># cd ..</p>
<p># wget http://apache.siamwebhosting.com/xmlgraphics/fop/source/fop-0.95-src.tar.gz</p>
<p># tar zxvf fop-0.95-src.tar.gz</p>
<p># cd fop-0.95</p>
<p># /usr/local/src/apache-ant-1.6.5/dist/bin/ant</p>
<p>now you have a 64 bit fop&#8230;or you can download it here:</p>
<p><a href="http://drunkensailor.org/software/fop-0.95-slackware64.tar.gz">drunkensailor.org/software/fop-0.95-slackware64.tar.gz</a></p>
<p>i have my ant available here:</p>
<p><a href="http://drunkensailor.org/software/fop-0.95-slackware64.tar.gz">drunkensailor.org/software/ant-1.6.5-slackware64.tar.gz</a></p>
<p>*both of these are just meant to be unpacked where you want to run them from and require some funky or full paths. feel free to make a real slackware package and i&#8217;ll host it, but for now it&#8217;s just compiled binaries alongside the source.</p>
<p>**the ant package is not the most current version of ant(1.7.something) because it required JUnit.jar which i dont have or plan on having (not part of the official slackware jdk)</p>
]]></content:encoded>
			<wfw:commentRss>http://benbernier.com/?feed=rss2&amp;p=148</wfw:commentRss>
		</item>
		<item>
		<title>block hulu ads and google analytics</title>
		<link>http://benbernier.com/?p=146</link>
		<comments>http://benbernier.com/?p=146#comments</comments>
		<pubDate>Tue, 22 Sep 2009 13:41:37 +0000</pubDate>
		<dc:creator>ben</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://benbernier.com/?p=146</guid>
		<description><![CDATA[add these lines to your hosts file. just rebuilt my laptop to 64bit and want to document these things before they disappear into the abyss of knowledge i once had. used in combination with adblockplus i get almost no ads on hulu
127.0.0.1       www.google-analytics.com google-analytics.com ssl.google-analytics.com analytics.google.com googleanalytics.com
127.0.0.1       flash.quantserve.com quantserve.com ads.hulu.com lightningcast.net stats5.lightningcast.net stats6.lightningcast.net stats7.lightningcast.net
pt.reward.tv pixel.quantserve.com
]]></description>
			<content:encoded><![CDATA[<p>add these lines to your hosts file. just rebuilt my laptop to 64bit and want to document these things before they disappear into the abyss of knowledge i once had. used in combination with adblockplus i get almost no ads on hulu</p>
<p>127.0.0.1       www.google-analytics.com google-analytics.com ssl.google-analytics.com analytics.google.com googleanalytics.com<br />
127.0.0.1       flash.quantserve.com quantserve.com ads.hulu.com lightningcast.net stats5.lightningcast.net stats6.lightningcast.net stats7.lightningcast.net<br />
pt.reward.tv pixel.quantserve.com</p>
]]></content:encoded>
			<wfw:commentRss>http://benbernier.com/?feed=rss2&amp;p=146</wfw:commentRss>
		</item>
		<item>
		<title>slacklite mirror version 0.2</title>
		<link>http://benbernier.com/?p=141</link>
		<comments>http://benbernier.com/?p=141#comments</comments>
		<pubDate>Wed, 09 Sep 2009 01:54:05 +0000</pubDate>
		<dc:creator>ben</dc:creator>
		
		<category><![CDATA[documentation]]></category>

		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://benbernier.com/?p=141</guid>
		<description><![CDATA[currently its at 0.2 and will undergo a complete overhaul to run with the aliens slackware mirror script as its base. its very primitive right now and requires manual checking of the changlog to know if it should be run. it also assumes a few directory paths that are documented in the readme, and assumes [...]]]></description>
			<content:encoded><![CDATA[<p>currently its at 0.2 and will undergo a complete overhaul to run with the aliens slackware mirror script as its base. its very primitive right now and requires manual checking of the changlog to know if it should be run. it also assumes a few directory paths that are documented in the readme, and assumes s local slackware mirror is available (also documented but untested change in readme that would not require a local mirror - involves changing one rsync command</p>
<p>all that being said it does seem to work and be downloaded from here: <a href="http://drunkensailor.org/slackware/slacklite-mirror-0.2.tar.gz">slacklite-mirror-0.2.tar.gz</a></p>
]]></content:encoded>
			<wfw:commentRss>http://benbernier.com/?feed=rss2&amp;p=141</wfw:commentRss>
		</item>
		<item>
		<title>mysql bizarre self union</title>
		<link>http://benbernier.com/?p=137</link>
		<comments>http://benbernier.com/?p=137#comments</comments>
		<pubDate>Wed, 29 Jul 2009 13:31:06 +0000</pubDate>
		<dc:creator>ben</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://benbernier.com/?p=137</guid>
		<description><![CDATA[i wanted to use this:
(select * from Seasons where id=5) union
(select * from Seasons where id&#60;&#62;5 order by id desc);
but i had to use this:
SELECT * FROM
(SELECT * FROM Seasons
WHERE id=5
ORDER BY id DESC) AS t1
UNION
SELECT * FROM
(SELECT * FROM Seasons
WHERE id&#60;&#62;5
ORDER BY id desc) AS t2
]]></description>
			<content:encoded><![CDATA[<p>i wanted to use this:</p>
<p>(select * from Seasons where id=5) union<br />
(select * from Seasons where id&lt;&gt;5 order by id desc);</p>
<p>but i had to use this:</p>
<p>SELECT * FROM<br />
(SELECT * FROM Seasons<br />
WHERE id=5<br />
ORDER BY id DESC) AS t1</p>
<p>UNION</p>
<p>SELECT * FROM<br />
(SELECT * FROM Seasons<br />
WHERE id&lt;&gt;5<br />
ORDER BY id desc) AS t2</p>
]]></content:encoded>
			<wfw:commentRss>http://benbernier.com/?feed=rss2&amp;p=137</wfw:commentRss>
		</item>
		<item>
		<title>klogd it</title>
		<link>http://benbernier.com/?p=132</link>
		<comments>http://benbernier.com/?p=132#comments</comments>
		<pubDate>Fri, 17 Jul 2009 18:34:25 +0000</pubDate>
		<dc:creator>ben</dc:creator>
		
		<category><![CDATA[documentation]]></category>

		<category><![CDATA[inspiration &amp; quotes]]></category>

		<category><![CDATA[moods]]></category>

		<category><![CDATA[quick hacks]]></category>

		<guid isPermaLink="false">http://benbernier.com/?p=132</guid>
		<description><![CDATA[step one: ln -s /dev/null /thetoilet
step two: klogd &#62; /thetoilet  2&#62;&#38;1
this is how you can clog the toilet with 2s and 1s
]]></description>
			<content:encoded><![CDATA[<p>step one: ln -s /dev/null /thetoilet</p>
<p>step two: klogd &gt; /thetoilet  2&gt;&amp;1</p>
<p>this is how you can clog the toilet with 2s and 1s</p>
]]></content:encoded>
			<wfw:commentRss>http://benbernier.com/?feed=rss2&amp;p=132</wfw:commentRss>
		</item>
		<item>
		<title>good fortune (no dash oh)</title>
		<link>http://benbernier.com/?p=130</link>
		<comments>http://benbernier.com/?p=130#comments</comments>
		<pubDate>Wed, 15 Jul 2009 18:58:09 +0000</pubDate>
		<dc:creator>ben</dc:creator>
		
		<category><![CDATA[inspiration &amp; quotes]]></category>

		<category><![CDATA[moods]]></category>

		<guid isPermaLink="false">http://benbernier.com/?p=130</guid>
		<description><![CDATA[a server told me this joke today:
He:     Do you like Kipling?
She:    Oh, you naughty boy, I don&#8217;t know!  I&#8217;ve never kippled!
]]></description>
			<content:encoded><![CDATA[<p>a server told me this joke today:<br />
He:     Do you like Kipling?<br />
She:    Oh, you naughty boy, I don&#8217;t know!  I&#8217;ve never kippled!</p>
]]></content:encoded>
			<wfw:commentRss>http://benbernier.com/?feed=rss2&amp;p=130</wfw:commentRss>
		</item>
		<item>
		<title>djb quotes</title>
		<link>http://benbernier.com/?p=128</link>
		<comments>http://benbernier.com/?p=128#comments</comments>
		<pubDate>Wed, 15 Jul 2009 03:19:20 +0000</pubDate>
		<dc:creator>ben</dc:creator>
		
		<category><![CDATA[helpful links]]></category>

		<category><![CDATA[inspiration &amp; quotes]]></category>

		<category><![CDATA[moods]]></category>

		<category><![CDATA[rants]]></category>

		<guid isPermaLink="false">http://benbernier.com/?p=128</guid>
		<description><![CDATA[somehow made my way here after fighting with his three versions of documentation for the same AMAZING product
incredibly amusing: http://en.wikiquote.org/wiki/Daniel_J._Bernstein
incredibly surprising: http://blogs.zdnet.com/security/?p=2812
]]></description>
			<content:encoded><![CDATA[<p>somehow made my way here after fighting with his three versions of documentation for the same AMAZING product</p>
<p>incredibly amusing: <a href="http://en.wikiquote.org/wiki/Daniel_J._Bernstein" target="_blank">http://en.wikiquote.org/wiki/Daniel_J._Bernstein</a></p>
<p>incredibly surprising: <a href="http://blogs.zdnet.com/security/?p=2812" target="_blank">http://blogs.zdnet.com/security/?p=2812</a></p>
]]></content:encoded>
			<wfw:commentRss>http://benbernier.com/?feed=rss2&amp;p=128</wfw:commentRss>
		</item>
		<item>
		<title>remove files and folders by date</title>
		<link>http://benbernier.com/?p=124</link>
		<comments>http://benbernier.com/?p=124#comments</comments>
		<pubDate>Wed, 15 Jul 2009 00:00:27 +0000</pubDate>
		<dc:creator>ben</dc:creator>
		
		<category><![CDATA[documentation]]></category>

		<category><![CDATA[quick hacks]]></category>

		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://benbernier.com/?p=124</guid>
		<description><![CDATA[this is designed to delete files by date from the current directory&#8230;.it was googles fault for providing &#8220;source&#8221; in a .deb with relative paths without being clear. plus it was my fault for not doing a test extract prior to doing a real one&#8230;.pretty irrelevant but was needed to tidy up my /usr/local/src
by design will [...]]]></description>
			<content:encoded><![CDATA[<p>this is designed to delete files by date from the current directory&#8230;.it was googles fault for providing &#8220;source&#8221; in a .deb with relative paths without being clear. plus it was my fault for not doing a test extract prior to doing a real one&#8230;.pretty irrelevant but was needed to tidy up my /usr/local/src</p>
<p>by design will remove files dated 2008-11-07 from slackware&#8217;s ls -al &#8230;probably would be wise to trial run it by changing the xargs to an echo first ;-)</p>
<p>#ls -altrh |grep &#8216;2008-11-07&#8242; |awk {&#8217;print $8&#8242;} |xargs rm -rfv</p>
]]></content:encoded>
			<wfw:commentRss>http://benbernier.com/?feed=rss2&amp;p=124</wfw:commentRss>
		</item>
	</channel>
</rss>
