<?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>Zach Dwiel &#187; howto</title>
	<atom:link href="http://dwiel.net/blog/category/howto/feed/" rel="self" type="application/rss+xml" />
	<link>http://dwiel.net</link>
	<description>Repository of code snippits and ideas</description>
	<lastBuildDate>Thu, 22 Apr 2010 15:15:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Howto Replace a Screen Invertor on a Dell Inspiron 1520</title>
		<link>http://dwiel.net/blog/howto-replace-a-screen-invertor-on-a-dell-1520/</link>
		<comments>http://dwiel.net/blog/howto-replace-a-screen-invertor-on-a-dell-1520/#comments</comments>
		<pubDate>Sat, 19 Dec 2009 19:32:54 +0000</pubDate>
		<dc:creator>dwiel</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[dell]]></category>
		<category><![CDATA[inverter]]></category>
		<category><![CDATA[laptop]]></category>
		<category><![CDATA[repair]]></category>

		<guid isPermaLink="false">http://dwiel.net/?p=167</guid>
		<description><![CDATA[I have a Dell Inspiron 1520 which started to get a whining noise right under the DELL logo below the screen right in the middle.  It would change pitch depending on how bright the screen was set at.  I replaced the inverter which cost me $15 on ebay.  The process was fairly [...]]]></description>
			<content:encoded><![CDATA[<p>I have a Dell Inspiron 1520 which started to get a whining noise right under the DELL logo below the screen right in the middle.  It would change pitch depending on how bright the screen was set at.  I replaced the inverter which cost me $15 on ebay.  The process was fairly simple but I took more things apart and made things generally more difficult on myself than I needed.  Here is the most simple way to repair your inverter on a Dell 1520 Inspiron laptop.</p>
<ul>
<li><b>Remove the plate covering the power button and numlock/capslock keys.</b>  This can be done by twisting a screwdriver under the little slot on the top right hand side of the cover.
<li><b>Remove the frame around the screen.</b> Do this by removing the 6 little pads and and stickers covering the screws to remove the frame from the screen.  There is one in each of the corners and two near the center/top.  Unscrew these screws.  To remove the screen cover frame you will need to twist and pry a little bit near the hinges.  Don't be afraid it does require some force.
<p>Once it is removed it should look like this:</p>
<p><a href="http://dwiel.net/files/InvertorReplace/IMG_0005.sm.JPG"><img src="http://dwiel.net/files/InvertorReplace/IMG_0005.tiny.JPG" alt="Screen with frame removed" /></a></p>
<li>With the frame off, <b>remove the screws holding the screen to the lid.</b>  There are some that screw down from the top and other that screw into the side of the screen, just look around.  Next, remove a couple screws holding the microphone/webcam board above the very top of the screen.  This will allow you to safely move the entire screen and get to the inverter.  Once you have done this, you can open your laptop lid all of the way so it is almost flat and move the screen and webcam board so they are flat on the keyboard.  It should look like this:
<p><a href="http://dwiel.net/files/InvertorReplace/IMG_0008.sm.JPG"><img src="http://dwiel.net/files/InvertorReplace/IMG_0008.tiny.JPG" alt="Screen and camera on keyboard" /></a></p>
<li><b>Replace the Inverter</b>.  At this point you should be able to easily get to the inverter which is between the hinges below the screen.  There are two cables to unplug.  One has a blue ribbon to pull on and the other a white connector to pull out.
<li>Once you've switched them out, put everything back together and you're done.
</ul>
<p>It took me a long time to realize that if I removed the screws to the microphone/webcam board it would move with the screen which led to lots of problems trying to get to the inverter while the screen was still attached to the lid.  That is really the only trick.</p>
<p>Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://dwiel.net/blog/howto-replace-a-screen-invertor-on-a-dell-1520/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>MySQL Permission Errors After Moving Datadir</title>
		<link>http://dwiel.net/blog/mysql-permission-errors-after-moving-datadir/</link>
		<comments>http://dwiel.net/blog/mysql-permission-errors-after-moving-datadir/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 03:52:11 +0000</pubDate>
		<dc:creator>dwiel</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[fyi]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://dwiel.net/?p=161</guid>
		<description><![CDATA[I wanted to make space on my root partition and so moved my mysql data dir to /home/mysql in /etc/mysql/my.conf and received the following errors:
dwiel@dwiel:~$ sudo mysqld
091111 20:39:16 [Warning] Can't create test file /home/mysql/dwiel.lower-test
091111 20:39:16 [Warning] Can't create test file /home/mysql/dwiel.lower-test
091111 20:39:16 [Note] Plugin 'FEDERATED' is disabled.
mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
091111 20:39:16 [ERROR] [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to make space on my root partition and so moved my mysql data dir to /home/mysql in /etc/mysql/my.conf and received the following errors:</p>
<p><code>dwiel@dwiel:~$ sudo mysqld<br />
091111 20:39:16 [Warning] Can't create test file /home/mysql/dwiel.lower-test<br />
091111 20:39:16 [Warning] Can't create test file /home/mysql/dwiel.lower-test<br />
091111 20:39:16 [Note] Plugin 'FEDERATED' is disabled.<br />
mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)<br />
091111 20:39:16 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.<br />
091111 20:39:16  InnoDB: Operating system error number 13 in a file operation.<br />
InnoDB: The error means mysqld does not have the access rights to<br />
InnoDB: the directory.<br />
InnoDB: File name ./ibdata1<br />
InnoDB: File operation call: 'open'.<br />
InnoDB: Cannot continue operation.<br />
</code></p>
<p>The problem was with apparmor.  It was restricting mysql from reading and writing to /home/mysql.  To correct this I edited the file /etc/apparmor.d/usr.sbin.mysqld and added:</p>
<p><code><br />
/home/mysql r,<br />
/home/mysql** rwk,<br />
</code></p>
<p>to the end of the file.  Then restarted apparmor:</p>
<p><code><br />
sudo /etc/init.d/apparmor restart<br />
</code></p>
<p>and then restarted apache with no problem</p>
]]></content:encoded>
			<wfw:commentRss>http://dwiel.net/blog/mysql-permission-errors-after-moving-datadir/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Build tolua++ files with makefile</title>
		<link>http://dwiel.net/blog/build-tolua-files-with-makefile/</link>
		<comments>http://dwiel.net/blog/build-tolua-files-with-makefile/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 15:04:46 +0000</pubDate>
		<dc:creator>dwiel</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://dwiel.net/?p=151</guid>
		<description><![CDATA[Here is how you can have your makefile build your tolua++ .cpp and .h files for you.  It should work for plain tolua also.
TOLUA = tolua++5.1
&#160;
tolua_%.cpp tolua_%.h : %.pkg
	$(TOLUA) -o $(@:%.h=%.cpp) -H $(@:%.cpp=%.h) $&#60;
this will generate tolua_file.cpp and tolua_file.h files from corresponding file.pkg files anytime they the .cpp or .h file is depended on [...]]]></description>
			<content:encoded><![CDATA[<p>Here is how you can have your makefile build your tolua++ .cpp and .h files for you.  It should work for plain tolua also.</p>
<pre>TOLUA = tolua++5.1
&nbsp;
tolua_%.cpp tolua_%.h : %.pkg
	$(TOLUA) -o $(@:%.h=%.cpp) -H $(@:%.cpp=%.h) $&lt;</pre>
<p>this will generate tolua_file.cpp and tolua_file.h files from corresponding file.pkg files anytime they the .cpp or .h file is depended on somewhere else in the file.  In my case I just added tolua_file.o to my list of objects.  Here is the full makefile for the project which required this - for reference:</p>
<pre>&nbsp;
&nbsp;
# LINUX
LIBLUA=lua5.1
# MAC OSX
#LIBLUA=lua
&nbsp;
# LDFLAGS=-arch x86_64
OBJS = swarm.o group.o scene.o vmath.o tolua_group.o tolua_swarm.o tolua_vmath.o
CXX = g++
CXXFLAGS = -Wall -c -O2 `sdl-config --cflags`
LDFLAGS = -Wall `sdl-config --libs`
INCLUDES = -I./include -I/usr/include/lua5.1 -I/opt/local/include
LIBS = -L./lib -lANN -lGL -lGLU -llo -ltolua++5.1 -l$(LIBLUA)
TOLUA = tolua++5.1
&nbsp;
tolua_%.cpp tolua_%.h : %.pkg
	$(TOLUA) -o $(@:%.h=%.cpp) -H $(@:%.cpp=%.h) $&lt;
&nbsp;
%.o: %.cpp
	$(CXX) $(INCLUDES) $(CXXFLAGS) -c $&lt; -o $@
&nbsp;
# the executable
swarm: $(OBJS)
	$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS)
&nbsp;</pre>
<p><a href="http://github.com/dwiel/swarm/raw/8716451c8b9844bbf9ec8e7f9649aca0b622c752/makefile">download</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dwiel.net/blog/build-tolua-files-with-makefile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JQuery + Greasemonkey</title>
		<link>http://dwiel.net/blog/jquery-greasemonkey/</link>
		<comments>http://dwiel.net/blog/jquery-greasemonkey/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 22:43:05 +0000</pubDate>
		<dc:creator>dwiel</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://dwiel.net/?p=86</guid>
		<description><![CDATA[Had to look around to figure out how to include jquery in greasemonkey.  Should have just guessed this first; Just use the @require, and your standard jquery document ready code.  Heres my template anyway.
&#160;
// ==UserScript==
// @name           JQuery Template
// @author     [...]]]></description>
			<content:encoded><![CDATA[<p>Had to look around to figure out how to include jquery in greasemonkey.  Should have just guessed this first; Just use the @require, and your standard jquery document ready code.  Heres my template anyway.</p>
<pre class="javascript">&nbsp;
<span style="color: #009900; font-style: italic;">// ==UserScript==</span>
<span style="color: #009900; font-style: italic;">// @name           JQuery Template</span>
<span style="color: #009900; font-style: italic;">// @author         Zach Dwiel</span>
<span style="color: #009900; font-style: italic;">// @description    Provide a basic template for using jquery in greasemonkey</span>
<span style="color: #009900; font-style: italic;">// @include        *://*</span>
<span style="color: #009900; font-style: italic;">// @require        http://code.jquery.com/jquery-latest.js</span>
<span style="color: #009900; font-style: italic;">// ==/UserScript==</span>
&nbsp;
$<span style="color: #66cc66;">&#40;</span>document<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">ready</span><span style="color: #66cc66;">&#40;</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    <span style="color: #009900; font-style: italic;">// your jquery code here</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
]]></content:encoded>
			<wfw:commentRss>http://dwiel.net/blog/jquery-greasemonkey/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
