<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jinan&#039;s Journal</title>
	<atom:link href="http://journal.jinanrealm.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://journal.jinanrealm.com</link>
	<description>A journal of all the tidbits of information I gathered through the years.</description>
	<lastBuildDate>Sun, 24 Jul 2011 21:19:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>OS X Lion Clean Install with Bootable CD</title>
		<link>http://journal.jinanrealm.com/os/osx/os-x-lion-clean-install-with-bootable-cd/</link>
		<comments>http://journal.jinanrealm.com/os/osx/os-x-lion-clean-install-with-bootable-cd/#comments</comments>
		<pubDate>Sun, 24 Jul 2011 21:19:46 +0000</pubDate>
		<dc:creator>jinan</dc:creator>
				<category><![CDATA[OSX]]></category>
		<category><![CDATA[Lion]]></category>
		<category><![CDATA[notes]]></category>
		<category><![CDATA[partition]]></category>

		<guid isPermaLink="false">http://journal.jinanrealm.com/?p=44</guid>
		<description><![CDATA[This quick guide will show you the steps needed to create a bootable OSX Lion CD and then will describe how to do a clean install of the OSX Operating System. Make a bootable CD of Lion First you will need to obtain a copy of the Lion installer application.  Locate the Lion installer application [...]]]></description>
			<content:encoded><![CDATA[<p>This quick guide will show you the steps needed to create a bootable OSX Lion CD and then will describe how to do a clean install of the OSX Operating System.</p>
<h2>Make a bootable CD of Lion</h2>
<ol>
<li>First you will need to obtain a copy of the Lion installer application. </li>
<li>Locate the Lion installer application with Finder.</li>
<li>Right (Secondar) click on the application and goto Show Package Contents.</li>
<li>Look for a  folder called SharedSupport.  Inside the folder you will see InstallESD.dmg, copy this file to a different location.</li>
<li>Launch the Disk Utility application.</li>
<li>Click the Burn icon then select the InstallESD.dmg you copied earlier and then insert a blank DVD.</li>
<li>Once finished you will have a bootable OS X Lion CD!</li>
</ol>
<p> </p>
<h2> Clean Install with Lion</h2>
<ol>
<li>Insert your CD and restart your computer while holding down option button. </li>
<li>Double click on the CD Icon and wait a few minutes while the CD loads.</li>
<li>Open up the disk utility from the menu option.</li>
<li>Select your primary partition (Macintosh HD is default) and click erase.  (<span style="color: #ff6600;">Obviously this will erase all your data on this partition&#8230;<span style="color: #000000;">)</span></span></li>
<li><span style="color: #ff6600;"><span style="color: #000000;">Once the partition has been erased, select the option to Reinstall OS X Lion on the same partition.</span></span></li>
<li><span style="color: #ff6600;"><span style="color: #000000;">After the installation, you will have a clean installation of OS X Lion!</span></span></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://journal.jinanrealm.com/os/osx/os-x-lion-clean-install-with-bootable-cd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Block ads with DD-WRT</title>
		<link>http://journal.jinanrealm.com/software/dd-wrt/block-ads-with-dd-wrt/</link>
		<comments>http://journal.jinanrealm.com/software/dd-wrt/block-ads-with-dd-wrt/#comments</comments>
		<pubDate>Sun, 03 Oct 2010 21:53:26 +0000</pubDate>
		<dc:creator>jinan</dc:creator>
				<category><![CDATA[DD-WRT]]></category>
		<category><![CDATA[ad blocking]]></category>
		<category><![CDATA[dd-wrt]]></category>
		<category><![CDATA[hosts]]></category>

		<guid isPermaLink="false">http://journal.jinanrealm.com/?p=38</guid>
		<description><![CDATA[I have been using a windows host file to block ads on websites for a while now.  The host file (http://www.mvps.org/winhelp2002/hosts.txt) redirects most ad links to 127.0.0.1 instead of their IP address.  By doing this, it shows either a blank page or &#8220;page can not be displayed&#8221; instead of the normal advertisements. I wanted to [...]]]></description>
			<content:encoded><![CDATA[<p>I have been using a windows host file to block ads on websites for a while now.  The host file (<a href="http://www.mvps.org/winhelp2002/hosts.txt" target="_blank">http://www.mvps.org/winhelp2002/hosts.txt</a>) redirects most ad links to 127.0.0.1 instead of their IP address.  By doing this, it shows either a blank page or &#8220;page can not be displayed&#8221; instead of the normal advertisements.</p>
<p>I wanted to take this one step further and apply this to my router (Linksys E2000) using DD-WRT.  After searching the dd-wrt forums (<a href="http://www.dd-wrt.com/phpBB2/viewtopic.php?t=20346" target="_blank">http://www.dd-wrt.com/phpBB2/viewtopic.php?t=20346</a>), I came across the script to do this.  Some routers like WRT54G v5 and v6 will not be able to do this as there is not enough memeory to store the host file. </p>
<p>To apply the script you will need to do 3 steps.</p>
<ol>
<li> Under the Services Tab, enable DNSMasq.</li>
<li> Under the Services Tab, enable Local DNS.</li>
<li>Under the Administration Tab, click the Commands tab.  Paste the code below in the box and click &#8216;Save Firewall&#8217;.</li>
</ol>
<p> </p>
<ul>
<li>Save Firewall &#8211; Saves this as a firewall script.  Every time your WAN port connects up, it will redownload the host file.</li>
<li>Save Startup &#8211; Saves this script as a startup script.  Each time your router boots, it will download the hosts file.</li>
<li>Run Commands &#8211; Run the script once.</li>
<li>Save Custom Script &#8211; Saves the script but does not run it, it stores it so you may run it manually.</li>
</ul>
<p> </p>
<p>What this script does it downloads the host file from the above link, searches for the IP address of 127.0.0.1, replaces 127.0.0.1 with 0.0.0.0 and then saves it to /etc/hosts on the router.  This will replace /etc/hosts file so you will not be able to use <a href="http://DD-WRT">http://DD-WRT</a> to get to the router anymore.  Just use <a href="http://192.168.1.1">http://192.168.1.1</a> or whatever the router IP address is.</p>
<p>Here is the script:<br />
<code>wget -O - http://www.mvps.org/winhelp2002/hosts.txt | grep 127.0.0.1 | sed -e '2,$s/127.0.0.1/0.0.0.0/g' -e 's/[[:space:]]*#.*$//' &amp;gt; /etc/hosts<br />
logger "$0: Hosts-file downloaded"</code><code>stopservice dnsmasq<br />
startservice dnsmasq<br />
logger "$0: DNSMasq restarted"</code></p>
]]></content:encoded>
			<wfw:commentRss>http://journal.jinanrealm.com/software/dd-wrt/block-ads-with-dd-wrt/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Linux on Microsoft VirtualPC</title>
		<link>http://journal.jinanrealm.com/software/virtualpc/linux-on-microsoft-virtualpc/</link>
		<comments>http://journal.jinanrealm.com/software/virtualpc/linux-on-microsoft-virtualpc/#comments</comments>
		<pubDate>Sun, 03 Oct 2010 04:38:06 +0000</pubDate>
		<dc:creator>jinan</dc:creator>
				<category><![CDATA[VirtualPC]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://journal.jinanrealm.com/?p=33</guid>
		<description><![CDATA[Use Text Mode or Safe Mode to install Linux.]]></description>
			<content:encoded><![CDATA[<p>I had an interesting thing happen to me when I tried installing CentOS 5 on VirualPC 2007. </p>
<p>Currently RedHat and SuSe linux guests are supported by VirtualPC.  Installing other linux guests is possible.  To install CentOS 5 as a guest in VirtualPC you will need to install it via text mode.  If you try to run the setup normally, you get wierd graphic issues like the one posted below.  This is due to the fact that it does not understand the graphics chipset that VirtualPC uses.</p>
<p><a href="http://journal.jinanrealm.com/wp-content/uploads/2010/10/CentOS5-MVPC.jpg"><img class="alignnone size-medium wp-image-35" title="CentOS5-MVPC" src="http://journal.jinanrealm.com/wp-content/uploads/2010/10/CentOS5-MVPC-300x126.jpg" alt="CentOS 5 graphical installation on VirtualPC 2007" width="300" height="126" /></a></p>
<p>To get into text mode in CentOS 5 at the boot: prompt type in linux text</p>
<p>To install Ubuntu 8 and later on VirtualPC you will need to run the installer in SafeMode.</p>
<p>After that, its pretty much straight forward.</p>
]]></content:encoded>
			<wfw:commentRss>http://journal.jinanrealm.com/software/virtualpc/linux-on-microsoft-virtualpc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installation of Street View on Google Maps unsucessful</title>
		<link>http://journal.jinanrealm.com/phones/installation-of-street-view-on-google-maps-unsucessful/</link>
		<comments>http://journal.jinanrealm.com/phones/installation-of-street-view-on-google-maps-unsucessful/#comments</comments>
		<pubDate>Tue, 14 Sep 2010 01:18:20 +0000</pubDate>
		<dc:creator>jinan</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Phones]]></category>
		<category><![CDATA[Android SDK]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[Google Search]]></category>
		<category><![CDATA[Street View]]></category>
		<category><![CDATA[Voice Search]]></category>

		<guid isPermaLink="false">http://journal.jinanrealm.com/?p=26</guid>
		<description><![CDATA[Usually this happens when the trying to update Street View, Voice Search, etc. and the signatures do not match.  Either there was a hacked version of this installed or something happened.  I found a fix for this, this requires the Android SDK (adb atleast).  If you have this run the following commands: adb root adb remount [...]]]></description>
			<content:encoded><![CDATA[<p>Usually this happens when the trying to update Street View, Voice Search, etc. and the signatures do not match.  Either there was a hacked version of this installed or something happened.  I found a fix for this, this requires the Android SDK (adb atleast).  If you have this run the following commands:</p>
<p>adb root<br />
adb remount<span style="text-decoration: line-through;"><br />
</span>adb shell<br />
rm /system/app/Street.apk<br />
exit<br />
adb uninstall com.google.android.street</p>
<p>Then reinstall Street View from the Market Place.</p>
<p>I have tried this method with VoiceSearch as well by doing:</p>
<p>rm /system/app/VoiceSearch.apk<br />
adb uninstall com.google.android.voicesearch</p>
<p>This works with Google Search as well:</p>
<p>rm /system/app/GoogleQuickSearchBox.apk<br />
adb uninstall com.google.android.googlequicksearchbox</p>
<p>If you get a Failure on trying to uninstall these apps, you will need to delete the APK first.</p>
<p><em>As always please backup your system first, I take no responsibility if this does not work.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://journal.jinanrealm.com/phones/installation-of-street-view-on-google-maps-unsucessful/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ISC-DHCP Programming Notes</title>
		<link>http://journal.jinanrealm.com/software/isc-dhcp-programming-notes/</link>
		<comments>http://journal.jinanrealm.com/software/isc-dhcp-programming-notes/#comments</comments>
		<pubDate>Mon, 13 Sep 2010 01:16:46 +0000</pubDate>
		<dc:creator>jinan</dc:creator>
				<category><![CDATA[ISC-DHCP]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[dhcpd.conf]]></category>
		<category><![CDATA[notes]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://journal.jinanrealm.com/?p=7</guid>
		<description><![CDATA[Here are some programming notes that I have collected working with ISC-DHCP at my job that may come in handy. If you put this code in the dhcpd.conf file (Located at /etc/dhcpd.conf in RedHat/CentOS or /etc/dhcp3/dhcpd.conf in Ubuntu) if known {      log (info, concat ("HOSTNAME: ", host-decl-name, " on ",binary-to-ascii (10, 8, ".", leased-address)," [...]]]></description>
			<content:encoded><![CDATA[<p>Here are some programming notes that I have collected working with ISC-DHCP at my job that may come in handy.</p>
<p>If you put this code in the dhcpd.conf file (Located at /etc/dhcpd.conf in RedHat/CentOS or /etc/dhcp3/dhcpd.conf in Ubuntu)</p>
<p><code>if known {<br />
     log (info, concat ("HOSTNAME: ", host-decl-name, " on ",binary-to-ascii (10, 8, ".", leased-address)," at ", binary-to-ascii (16, 8, ":", substring (hardware, 1, 6))));<br />
}</code></p>
<p>Will result in a message simular to the following in your DHCP Log file:</p>
<p><code>HOSTNAME: TestPC001 on 208.x.x.75 at d0:50:56:ac:74:71<br />
DHCPDISCOVER from d0:50:56:ac:74:71 via eth0<br />
DHCPOFFER on 208.x.x.75 to d0:50:56:ac:74:71 via eth0<br />
DHCPREQUEST for 208.x.x.75 (172.18.1.2) from d0:50:56:ac:74:71 via eth0<br />
DHCPACK on 208.x.x.75 to d0:50:56:ac:74:71 via eth0</code></p>
<p>The following code will check to see if the incoming packet has the DHCP Broadcast Flag set.  If it does, it will log to the log file that someone has broadcast flag set.</p>
<p><code>if binary-to-ascii (16,8,"",packet(10,3)) = "8000" {<br />
     log (info, concat ("The user ", binary-to-ascii(16,8, ":", substring(hardware,1,6)), " has the DHCP Broadcast Flag set."));<br />
}</code></p>
<p><strong>Example Log file entry:</strong></p>
<p><code>DHCPDISCOVER from d0:50:56:ac:74:71 via eth0<br />
The user d0:50:56:ac:74:71 has the DHCP Broadcast Flag set.</code><code>DHCPOFFER on 208.x.x.75 to d0:50:56:ac:74:71 via eth0</code></p>
<p>The following code in the configuration file will add anyone who has the DHCP Broadcast flag set to a member of &#8220;Broadcasters&#8221; then you may allow or deny them in a subnet declaration:</p>
<p><code>class "broadcasters" {<br />
     match if binary-to-ascii (16,8,"",packet(10,3)) = "8000";<br />
}</code></p>
<p>In the subnet declaration you then can do allow members of broadcasters; to allow only those specific users.</p>
<p><strong>Term Explaination:</strong></p>
<p><span style="text-decoration: underline;">host-decl-name</span> &#8211; Is the host declaration name in the dhcpd.conf file (host TestPC { &#8230; })<br />
<span style="text-decoration: underline;">binary-to-ascii(a,b,c,d)</span> &#8211; binary-to-ascii(Base 2 to 16, width in bits of each number, seperates each bit with the character, the numeric expression to be tested)<br />
<span style="text-decoration: underline;">leased-address</span> &#8211; The IP address leased to the client (in binary)<br />
<span style="text-decoration: underline;">substring(a,b,c)</span> - substring(hardware, 1, 6) &#8211; This gets the MAC address of the client.  substring(data expression, offset bytes, length in bytes)<br />
<span style="text-decoration: underline;">hardware</span> &#8211; Returns type of network indicated in packet (Ethernet), then the MAC address.<br />
<span style="text-decoration: underline;">packet(a,b)</span> &#8211; packet(offset byte, additional bytes) &#8212; This starts at the Bootstrap Protocol.</p>
<p><strong>Packet Information:</strong></p>
<p>0,1 &#8211; Message Type (01 &#8211; Boot Request, 02 &#8211; Boot Reply)<br />
1,1 &#8211; Hardware Type (01 &#8211; Ethernet)<br />
2,1 – Hardware Address Length (usually 06)<br />
3,1 – Hops (usually 00)<br />
4,7 – Transaction ID of the handshake.<br />
8,3 – Seconds Elapsed<br />
10,3 – Bootflag (0000 = off, 8000 = on)<br />
12,7 – Client IP Address<br />
16,7 – Your (client) IP Address<br />
20,7 – Next Server IP Address<br />
24,7 – Relay Agent IP Address<br />
28,11 – Client MAC Address<br />
34,19 – Client Hardware Address Padding<br />
44,63 – Server host name<br />
76,127 – Boot File<br />
140,7 – Magic Cookie (DHCP)<br />
144,1 – DHCP Message &#8211; Option<br />
146,1 – DHCP Message &#8211; Length<br />
148,1 – DHCP Message &#8211; Value<br />
150,1 – Client ID – Length<br />
152,13 – Client ID – Value (All of the client ID values past 152)<br />
152,1 – Client ID – Hardware Type<br />
154,11 – Client ID – Client MAC Address<br />
160,1 – Requested IP – Option<br />
162,1 – Requested IP – Length<br />
164,7 – Requested IP – Value<br />
168,21 – Host Name<br />
180,19 – Vendor Class ID<br />
190,1 – Param List &#8211; Option<br />
192,1 – Param List &#8211; Length<br />
194,23 – Param List – Value (All the param list values past 194)<br />
194,1 – Param List &#8211; Subnet Mask<br />
196,1 &#8211; Param List &#8211; Domain Name<br />
198,1 – Param List – Router<br />
200,1 – Param List – DNS<br />
202,1 – Param List – NetBIOS Name Server<br />
204,1 – Param List – NetBIOS Node Type<br />
206,1 – Param List – NetBIOS Scope<br />
208,1 – Param List – Perform Router Discover<br />
210,1 – Param List – Static Route<br />
212,1 – Param List – Classless Static Route<br />
214,1 – Param List – Private Static Route (Microsoft)<br />
216,1 – Param List – Vendor Specific</p>
]]></content:encoded>
			<wfw:commentRss>http://journal.jinanrealm.com/software/isc-dhcp-programming-notes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

