<?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>Lockstockmods</title>
	<atom:link href="http://www.lockstockmods.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lockstockmods.net</link>
	<description>If its not broken... take it apart and mod it</description>
	<pubDate>Thu, 08 May 2008 16:30:50 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>CSS Cheatsheet</title>
		<link>http://www.lockstockmods.net/2008/05/01/css-cheatsheet/</link>
		<comments>http://www.lockstockmods.net/2008/05/01/css-cheatsheet/#comments</comments>
		<pubDate>Thu, 01 May 2008 13:22:10 +0000</pubDate>
		<dc:creator>Kode</dc:creator>
		
		<category><![CDATA[Cheatsheets]]></category>

		<category><![CDATA[Web Dev]]></category>

		<guid isPermaLink="false">http://www.lockstockmods.net/?p=69</guid>
		<description><![CDATA[Background
Backgrounds can be tricky. Nevertheless, effective when condensed correctly. The syntax for declaring the background shorthand values are as follows:
background properties
element {
background-color: color &#124;&#124; #hex &#124;&#124; (rgb / % &#124;&#124; 0-255);
background-image:url(URI);
background-repeat: repeat &#124;&#124; repeat-x &#124;&#124; repeat-y &#124;&#124; no-repeat;
background-position: X Y &#124;&#124; (top&#124;&#124;bottom&#124;&#124;center) (left&#124;&#124;right&#124;&#124;center);
background-attachment: scroll &#124;&#124; fixed;
}
Believe it or not, all these properties can be combined [...]]]></description>
			<content:encoded><![CDATA[<h3>Background</h3>
<p>Backgrounds can be tricky. Nevertheless, effective when condensed correctly. The syntax for declaring the background shorthand values are as follows:</p>
<h3 class="code">background properties</h3>
<pre><code>element {
background-color: color || #hex || (rgb / % || 0-255);
background-image:url(URI);
background-repeat: repeat || repeat-x || repeat-y || no-repeat;
background-position: X Y || (top||bottom||center) (left||right||center);
background-attachment: scroll || fixed;
}</code></pre>
<p>Believe it or not, all these properties can be combined into one single <strong>background</strong> property as follows:</p>
<h3 class="code">the background shorthand property</h3>
<pre><code>element {
background:
#fff
url(image.png)
no-repeat
20px 100px
fixed;
}</code></pre>
<h3>The Unknown</h3>
<p>Often times developers find themselves wondering <q>What if I leave out this value or that one? How will that effect the design?</q>. Good questions.</p>
<p>By default, the background property will assume the following when you <strong>do not</strong> declare each value of the properties.</p>
<h3 class="code">default background property values</h3>
<pre><code>
element {
background-color: transparent;
background-image: none;
background-repeat: repeat;
background-position: top left;
background-attachment: scroll;
}</code></pre>
<p><strong>Lesson learned: </strong><em>be careful on what you don’t declare. By chosing to not declare a value on a shorthand property, you are explicitly declaring the above default settings.</em> For example, let’s look at the following example.</p>
<h3 class="code">background shorthand example (unexplicit)</h3>
<pre><code>element {
background:red url(image.png);
}</code></pre>
<p>This would be the same as declaring the following values:</p>
<h3 class="code">background shorthand example (explicit)</h3>
<pre><code>element {
background:red url(image.png) repeat top left scroll;
}</code></pre>
<h3>Font</h3>
<p>Font is perhaps the trickiest. However, it follows the same rules as the background shorthand property. <em>All that you do not declare will have unexplicit values</em>. Here is the font shorthand specification:</p>
<h3 class="code">font properties</h3>
<pre><code>element {
font-style: normal || italic || oblique;
font-variant:normal || small-caps;
font-weight: normal || bold || bolder || || lighter || (100-900);
font-size: (number+unit) || (xx-small - xx-large);
line-height: normal || (number+unit);
font-family:name,"more names";
}</code></pre>
<p>The default values for the font shorthand property are as follows:</p>
<h3 class="code">default font property values</h3>
<pre><code>element {
font-style: normal;
font-variant:normal;
font-weight: normal;
font-size: inherit;
line-height: normal;
font-family:inherit;
}</code></pre>
<p>And of course without any further ado. The font shorthand property syntax:</p>
<h3 class="code">the font shorthand property</h3>
<pre><code>element {
font:
normal
normal
normal
inhert/
normal
inherit;
}</code></pre>
<p>Here is where it gets tricky. The fact that <code>font-style, font-variant,</code> and <code>font-weight</code> all come “normal” out of the box, you may need to pay a little more close attention when you’re styling elements that come with default browser styles like &lt;h1&gt; - &lt;h6&gt; or &lt;strong&gt; and &lt;em&gt;. For example, styling the strong element:</p>
<h3 class="code">strong element styled with font</h3>
<pre><code>strong {
font:12px verdana;
}</code></pre>
<p>By writing the above into your style sheet, you will be unexplicitly removing the <strong>font-weight:bold</strong> default browser style that is applied to strong elements.</p>
<p>Last but not least (for -font- that is), a real world example:</p>
<h3 class="code">font shorthand property example (unexplicit)</h3>
<pre><code>p {
font:bold 1em/1.2em georgia,"times new roman",serif;
}</code></pre>
<p>This would be the same as declaring the following properties:</p>
<h3 class="code">the font shorthand property (explicit)</h3>
<pre><code>p {
font-style:normal;
font-variant:normal;
font-weight:bold;
font-size:1em;
line-height:1.2em;
font-family:georgia,"times new roman",serif;
}</code></pre>
<h3 id="borderProperty">Border</h3>
<p>Let’s not waste time discussing the warnings. The same rules apply from here on out. This is all you need to know</p>
<h3 class="code">border properties</h3>
<pre><code>element {
border-width: number+unit;
border-style: (numerous);
border-color: color || #hex || (rgb / % || 0-255);
}</code></pre>
<p>becomes this:</p>
<h3 class="code">the border shorthand propertie</h3>
<pre><code>element {
border:
4px
groove
linen
}</code></pre>
<p>Don’t ask me how that would look. The fact that “linen” is in there, things could get scary. Nevermind the matter, here is where ‘border’ gets funny.</p>
<h3 class="code">border examples</h3>
<pre><code>p {
border:solid blue;
}
/* will create a '3px' solid blue border...
who knows where 3px came from?? */</code>

p {
border:5px solid;
}
/* will create 5px solid &#8216;black&#8217; border&#8230;
default must be black?? */

p {
border:dashed;
}
/* will create a &#8216;3px&#8217; dashed &#8216;black&#8217; border&#8230;
3px black lines unite! */

p { border:10px red; }
p { border:10px; }
p { border:red; }
/* these just don&#8217;t even work */</pre>
<p>One thing to specially take note about declaring a border without a color, the default will be ‘black’ unless otherwise noted through an explicit or inherited ‘color’ property. See the following examples:</p>
<h3 class="code">border color examples</h3>
<pre><code>
p {
border:dotted;
color:red;
}
/* will create a 3px dotted red border */
/* ----------------------------- */
body {
color:blue;
}
body p {
border:5px solid;
}
/* will create a 5px solid blue border */
/* ----------------------------- */</code></pre>
<p>Get it? Got it. Good! (isn’t that a song?) Anyway. On with this</p>
<h3>Margin and Padding</h3>
<p>These are by far the easiest. Just think about the hands of a clock starting at noon, and follow the hour. For the sake of brevity, we’ll be working with margin (since it’s a shorter word). So for all cases of margin, the same rules apply to padding.</p>
<h3 class="code">margin properties.</h3>
<pre><code>element {
margin-top: number+unit;
margin-right: number+unit;
margin-bottom: number+unit;
margin-left: number+unit;
}</code></pre>
<p>… combined into the margin superpowers:</p>
<h3 class="code">the margin shorthand property</h3>
<pre><code>/* top right bottom left */
element {
margin: auto auto auto auto;
}</code></pre>
<p>Of course, you may declare your margin with one, two, three, or four values. Here is how each scenario will be played out:</p>
<h3 class="code">margin fun</h3>
<pre><code>/* adds a 10px margin to all four sides */
element {
margin:10px;
}</code>

/* adds a 20px margin to top and bottom
and a 5px margin to left and right */
element {
margin:20px 5px;
}

/* adds a 50px margin to top
and a 10px margin to left and right
and a 300px margin to bottom */
element {
margin:50px 10px 300px;
}</pre>
<p>Understood? Let’s keep going. This is fun isn’t it! (whatever, you like it).</p>
<h3>Outline</h3>
<p>Quite frankly, this property has dropped off the existence of the design radar. Mainly because of lack of browsers supporting this CSS 2.1 standard (yep, it’s an actual property), but nonetheless, it too has a shorthand property. This property follows the exact same (or same exact - they mean the same thing) specification as the ‘border’ shorthand property. But, for purposes of this being a Guide, it must be here. So:</p>
<h3 class="code">outline properties</h3>
<pre><code>element {
outline-width: number+unit;
outline-style: (numerous);
outline-color: color || #hex || (rgb / % || 0-255);
}</code></pre>
<p>Outline written as shorthand:</p>
<h3 class="code">outline shorthand property</h3>
<pre><code>element {
outline:3px dotted gray;
}</code></pre>
<p>For purposes of trying to keep things from repeating, please see the <a title="Jump to Border Properties on this page" href="#borderProperty">border shorthand section</a> on this document to understand the odds, ends, and quirks of the outline property.</p>
<h3>List-style</h3>
<p>This is it. The last one. It’s rarely used frequently. Hence rarely. That is why I kept it until the end (sorry, the best was first in my own opinion). Here is the list-style properties:</p>
<h3 class="code">list-style properties</h3>
<pre><code>element {
list-style-type: (numerous);
list-style-position:inside || outside;
list-style-image:url(image.png);
}</code></pre>
<p>Here is the defaults:</p>
<h3 class="code">list-style property defaults</h3>
<pre><code>element {
list-style-type:disc;
list-style-position:outside;
list-style-image:none;
}</code></pre>
<p>And for the sake of final brevity. Here is a simple example:</p>
<h3 class="code">list-style shorthand property example</h3>
<pre><code>ul li {
list-style:square inside url(image.png);
}
/* in this particular case if image.png is not available
then a square will be provided as secondary */</code></pre>
<p>This guide is originally from http://www.dustindiaz.com/css-shorthand/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lockstockmods.net/2008/05/01/css-cheatsheet/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MySQL Cheatsheet</title>
		<link>http://www.lockstockmods.net/2008/05/01/mysql-cheatsheet/</link>
		<comments>http://www.lockstockmods.net/2008/05/01/mysql-cheatsheet/#comments</comments>
		<pubDate>Thu, 01 May 2008 12:44:17 +0000</pubDate>
		<dc:creator>Kode</dc:creator>
		
		<category><![CDATA[Web Dev]]></category>

		<guid isPermaLink="false">http://www.lockstockmods.net/?p=68</guid>
		<description><![CDATA[Query
SELECT * FROM table
SELECT * FROM table1, table2, ...
SELECT field1, field2, ... FROM table1, table2, ...
SELECT ... FROM ... WHERE condition
SELECT ... FROM ... WHERE condition GROUPBY field
SELECT ... FROM ... WHERE condition GROUPBY field HAVING condition2
SELECT ... FROM ... WHERE condition ORDER BY field1, field2
SELECT ... FROM ... WHERE condition ORDER BY field1, field2 [...]]]></description>
			<content:encoded><![CDATA[<h3>Query</h3>
<pre><code>SELECT * FROM table
SELECT * FROM table1, table2, ...
SELECT field1, field2, ... FROM table1, table2, ...
SELECT ... FROM ... WHERE condition
SELECT ... FROM ... WHERE condition GROUPBY field
SELECT ... FROM ... WHERE condition GROUPBY field HAVING condition2
SELECT ... FROM ... WHERE condition ORDER BY field1, field2
SELECT ... FROM ... WHERE condition ORDER BY field1, field2 DESC
SELECT ... FROM ... WHERE condition LIMIT 10
SELECT DISTINCT field1 FROM ...
SELECT DISTINCT field1, field2 FROM ...</code></pre>
<pre><code>SELECT ... FROM t1 JOIN t2 ON t1.id1 = t2.id2 WHERE condition
SELECT ... FROM t1 LEFT JOIN t2 ON t1.id1 = t2.id2 WHERE condition
SELECT ... FROM t1 JOIN (t2 JOIN t3 ON ...) ON ...</code></pre>
<p>conditionals:</p>
<pre><code>field1 = value1
field1 &lt;&gt; value1
field1 LIKE 'value _ %'
field1 IS NULL
field1 IS NOT NULL
field1 IS IN (value1, value2)
field1 IS NOT IN (value1, value2)
condition1 AND condition2
condition1 OR condition2</code></pre>
<h3>Data Manipulation</h3>
<pre><code>INSERT INTO table1 (field1, field2, ...) VALUES (value1, value2, ...)</code></pre>
<pre><code>DELETE FROM table1 / TRUNCATE table1
DELETE FROM table1 WHERE condition
-- join:
DELETE FROM table1, table2 FROM table1, table2 WHERE table1.id1 = table2.id2 AND condition</code></pre>
<pre><code>UPDATE table1 SET field1=new_value1 WHERE condition
-- join:
UPDATE table1, table2 SET field1=new_value1, field2=new_value2, ... WHERE table1.id1 = table2.id2 AND condition</code></pre>
<h3>Browsing</h3>
<pre><code>SHOW DATABASES
SHOW TABLES
SHOW FIELDS FROM table / DESCRIBE table
SHOW CREATE TABLE table
SHOW PROCESSLIST
KILL process_number</code></pre>
<h3>Create / delete database</h3>
<pre><code>CREATE DATABASE mabase
CREATE DATABASE mabase CHARACTER SET utf8
DROP DATABASE mabase</code></pre>
<pre><code>ALTER DATABASE mabase CHARACTER SET utf8</code></pre>
<h3>Create/delete/modify table</h3>
<pre><code>CREATE TABLE table (field1 type1, field2 type2, ...)
CREATE TABLE table (field1 type1, field2 type2, ..., INDEX (field))
CREATE TABLE table (field1 type1, field2 type2, ..., PRIMARY KEY (field1))
CREATE TABLE table (field1 type1, field2 type2, ..., PRIMARY KEY (field1, field2))
CREATE TABLE table1 (fk_field1 type1, field2 type2, ...,
FOREIGN KEY (fk_field1) REFERENCES table2 (t2_fieldA))
[ON UPDATE|ON DELETE] [CASCADE|SET NULL]
CREATE TABLE table1 (fk_field1 type1, fk_field2 type2, &#8230;,
FOREIGN KEY (fk_field1, fk_field2) REFERENCES table2 (t2_fieldA, t2_fieldB))
CREATE TABLE table IF NOT EXISTS (&#8230;)</code></pre>
<pre><code>CREATE TEMPORARY TABLE table (...)</code></pre>
<pre><code>DROP TABLE table
DROP TABLE IF EXISTS table
DROP TABLE table1, table2, ...</code></pre>
<pre><code>ALTER TABLE table MODIFY field1 type1
ALTER TABLE table MODIFY field1 type1 NOT NULL ...
ALTER TABLE table CHANGE old_name_field1 new_name_field1 type1
ALTER TABLE table CHANGE old_name_field1 new_name_field1 type1 NOT NULL ...
ALTER TABLE table ALTER field1 SET DEFAULT ...
ALTER TABLE table ALTER field1 DROP DEFAULT
ALTER TABLE table ADD new_name_field1 type1
ALTER TABLE table ADD new_name_field1 type1 FIRST
ALTER TABLE table ADD new_name_field1 type1 AFTER another_field
ALTER TABLE table DROP field1
ALTER TABLE table ADD INDEX (field);</code></pre>
<pre><code>-- Change field order:
ALTER TABLE table MODIFY field1 type1 FIRST
ALTER TABLE table MODIFY field1 type1 AFTER another_field
ALTER TABLE table CHANGE old_name_field1 new_name_field1 type1 FIRST
ALTER TABLE table CHANGE old_name_field1 new_name_field1 type1 AFTER another_field</code></pre>
<pre><code>ALTER TABLE old_name RENAME new_name;</code></pre>
<h3>Keys</h3>
<pre><code>CREATE TABLE table (..., PRIMARY KEY (field1, field2))
CREATE TABLE table (..., FOREIGN KEY (field1, field2) REFERENCES table2 (t2_field1, t2_field2))</code></pre>
<h3>Privileges</h3>
<pre><code>GRANT ALL PRIVILEGES ON base.* TO 'user'@'localhost' IDENTIFIED BY 'password';
GRANT SELECT, INSERT, DELETE ON base.* TO 'user'@'localhost' IDENTIFIED BY 'password';
REVOKE ALL PRIVILEGES ON base.* FROM 'user'@'host'; -- one permission only
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user'@'host'; -- all permissions</code></pre>
<pre><code>SET PASSWORD = PASSWORD('new_pass')
SET PASSWORD FOR 'user'@'host' = PASSWORD('new_pass')
SET PASSWORD = OLD_PASSWORD('new_pass')</code></pre>
<pre><code>DROP USER 'user'@'host'</code></pre>
<h3>Main data types</h3>
<pre><code>TINYINT (1o: -217+128) SMALLINT (2o: +-65 000)
MEDIUMINT (3o: +-16 000 000) INT (4o: +- 2 000 000 000)
BIGINT (8o: +-9.10^18)
Precise interval: -(2^(8*N-1)) -&gt; (2^8*N)-1
/!\ INT(2) = "2 digits displayed" -- NOT "number with 2 digits max"</code></pre>
<pre><code>FLOAT(M,D) DOUBLE(M,D) FLOAT(D=0-&gt;53)
/!\ 8,3 -&gt; 12345,678 -- NOT 12345678,123!</code></pre>
<pre><code>TIME (HH:MM) YEAR (AAAA) DATE (AAAA-MM-JJ) DATETIME (AAAA-MM-JJ HH:MM; années 1000-&gt;9999)
TIMESTAMP (like DATETIME, but 1970-&gt;2038, compatible with Unix)</code></pre>
<pre><code>VARCHAR (single-line; explicit size)  TEXT (multi-lines; max size=65535)  BLOB (binary; max size=65535)
Variants for TEXT&amp;BLOB: TINY (max=255) MEDIUM (max=~16000) LONG (max=4Go)
Ex: VARCHAR(32), TINYTEXT, LONGBLOB, MEDIUMTEXT</code></pre>
<pre><code>ENUM ('value1', 'value2', ...) -- (default NULL, or '' if NOT NULL)</code></pre>
<h3>Forgot root password?</h3>
<pre><code>$ /etc/init.d/mysql stop
$ mysqld_safe --skip-grant-tables
$ mysql # on another terminal
mysql&gt; UPDATE mysql.user SET password=PASSWORD('nouveau') WHERE user='root';
## Kill mysqld_safe from the terminal, using Control + \
$ /etc/init.d/mysql start</code></pre>
<h3>Repair tables after unclean shutdown</h3>
<pre><code>mysqlcheck --all-databases
mysqlcheck --all-databases --fast</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.lockstockmods.net/2008/05/01/mysql-cheatsheet/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Easy way to PXE Boot Windows</title>
		<link>http://www.lockstockmods.net/2008/04/26/easy-way-to-pxe-boot-windows/</link>
		<comments>http://www.lockstockmods.net/2008/04/26/easy-way-to-pxe-boot-windows/#comments</comments>
		<pubDate>Sat, 26 Apr 2008 19:39:16 +0000</pubDate>
		<dc:creator>Kode</dc:creator>
		
		<category><![CDATA[Windows]]></category>

		<category><![CDATA[install windows over the network]]></category>

		<category><![CDATA[install windows over the network with no CD drive]]></category>

		<category><![CDATA[install windows with netboot]]></category>

		<category><![CDATA[install windows with pxe]]></category>

		<category><![CDATA[netboot windows]]></category>

		<category><![CDATA[network boot windows]]></category>

		<category><![CDATA[PXE install windows]]></category>

		<category><![CDATA[windows pxe boot]]></category>

		<guid isPermaLink="false">http://www.lockstockmods.net/?p=64</guid>
		<description><![CDATA[This guide provides an easy and relatively quick way to PXE boot windows which means you can install Windows over the network with PXE without the need for a CD drive.  While the previous guide allows you to slip stream updates and add extra programs it took a LONG LONG time to do, especially [...]]]></description>
			<content:encoded><![CDATA[<p>This guide provides an easy and relatively quick way to PXE boot windows which means you can install Windows over the network with PXE without the need for a CD drive.  While the previous guide allows you to slip stream updates and add extra programs it took a LONG LONG time to do, especially with all the downloads it needed to do, this one just installs a vanilla XP, nice and simple, and a lot quicker <img src='http://www.lockstockmods.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h3>Step 1: Getting started.</h3>
<p>What you’ll need:</p>
<ol>
<li>Windows 2000/XP CD (to get the i386 directory off it)</li>
<li>PC running 2000/XP (to act as a server)</li>
<li>Laptop capable of booting over PXE (such as the L400).</li>
<li><a href="http://tftpd32.jounin.net/">Tftpd32<br />
</a></li>
<li>Bart Network Boot Disk</li>
<li><a href="http://www.lockstockmods.net/download/14/" >SMARTDRV.EXE</a></li>
<li>A Share. The Server must be able to share files (any Microsoft Windows computer can).</li>
<li>Working router or plain crossover cable.</li>
</ol>
<p>Once you’ve collected all of the above, lets begin;</p>
<ol>
<li>Create a share, for the sake of argument create it at c:\WINSTALL</li>
<li>Copy your i386 folder and <a href="http://www.lockstockmods.net/download/14/" >SMARTDRV.EXE</a> into this folder</li>
<li>Make a note of your computer name/host name, you can find this out by right clicking on &#8220;My Computer&#8221;, going to properties, go to &#8220;Computer Name&#8221; tab, look under Full computer name, in my example, the computers name is STAR, i believe the name needs to be 12 chars or less for this to work in dos mode, so if its longer change it and reboot.</li>
<p><a href="http://www.lockstockmods.net/wp-content/uploads/2008/04/my-properties.jpg" ><img class="alignnone size-medium wp-image-65" title="my-properties" src="http://www.lockstockmods.net/wp-content/uploads/2008/04/my-properties-258x300.jpg" alt="" width="258" height="300" /></a></p>
<li>Create a folder to PXE boot from, c:\OUTPUT</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.lockstockmods.net/2008/04/26/easy-way-to-pxe-boot-windows/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Install Windows over network with PXE</title>
		<link>http://www.lockstockmods.net/2008/04/25/install-windows-over-network-with-pxe/</link>
		<comments>http://www.lockstockmods.net/2008/04/25/install-windows-over-network-with-pxe/#comments</comments>
		<pubDate>Fri, 25 Apr 2008 01:41:36 +0000</pubDate>
		<dc:creator>Kode</dc:creator>
		
		<category><![CDATA[Windows]]></category>

		<category><![CDATA[install windows with netboot]]></category>

		<category><![CDATA[install windows with pxe]]></category>

		<category><![CDATA[netboot windows]]></category>

		<category><![CDATA[network boot windows]]></category>

		<category><![CDATA[PXE install windows]]></category>

		<category><![CDATA[windows pxe boot]]></category>

		<guid isPermaLink="false">http://www.lockstockmods.net/?p=34</guid>
		<description><![CDATA[You may have read in a previous post how i installed Ubuntu on my sisters laptop with PXE, well this worked great, but i couldnt for the life of me get WPA to work on the wireless card, so after about a week of trying i decided to try and PXE boot windows as the [...]]]></description>
			<content:encoded><![CDATA[<p>You may have read in a previous post how i installed Ubuntu on my sisters laptop with PXE, well this worked great, but i couldnt for the life of me get WPA to work on the wireless card, so after about a week of trying i decided to try and PXE boot windows as the laptop had no floppy drive, no CD drive and couldnt boot from USB, what follows is the result of the trials and tribulations of that experience&#8230;. enjoy. If you want a quicker, simpler installation with a vanilla XP check this <a href="http://www.lockstockmods.net/2008/04/26/easy-way-to-pxe-boot-windows/" >Easy way to PXE Boot Windows guide.</a></p>
<p><strong>Downloads</strong><br />
Note: There is a file embedded within this post, please visit this post to download the file.<br />
Note: There is a file embedded within this post, please visit this post to download the file.<br />
Note: There is a file embedded within this post, please visit this post to download the file.<br />
Note: There is a file embedded within this post, please visit this post to download the file.<br />
Note: There is a file embedded within this post, please visit this post to download the file.</p>
<h3>Step 1: Getting started.</h3>
<p>What you’ll need:</p>
<ol>
<li>The Server - Any PC running 2000/XP</li>
<li>The Source - Windows 2000/XP CD (we need to get the i386 directory)</li>
<li>The Client - Laptop capable of booting over PXE (such as the L400).</li>
<li><a href="http://tftpd32.jounin.net/">Tftpd32<br />
</a></li>
<li>SysAngel DVD Generator <a href="http://www.windowsdream.com/dvdgen/download.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.windowsdream.com');" target="_blank">here</a> or if you already have .NET framework 1.1.4322 or higher you can get the self extractible <a href="http://www.lockstockmods.net/download/9/" >here</a></li>
<li>A Share. The Server must be able to share files (any Microsoft Windows computer can).</li>
<li>Working router or plain crossover cable.</li>
</ol>
<p>Once you’ve collected all of the above, do the below:</p>
<ol>
<li>Download and install latest DVD Generator. It&#8217;s a single EXE, double-clicking it will install / upgrade it.</li>
<li>Create a C:\OUTPUT directory to store the necessary files for your RIS Service. (There should be at least 600 Mo of free space on the selected drive, but it could be as big as 5 or 6 Go if you choose to download every available software.)</li>
<li>Share the C:\OUTPUT directory, according Read rights to everyone. Let&#8217;s keep the default share name (OUTPUT).</li>
</ol>
<p>Downloading necessary sources using the DVD Generator.</p>
<ol>
<li>Launch the SysAngel DVD Generator.</li>
<li>In the &#8220;1. Select your output folder&#8221; textbox, enter C:\OUTPUT.</li>
<li>In the &#8220;2. Indicate your Windows XP source&#8221;, browse to the i386 directory of the Windows XP you want to deploy.</li>
<li>In the &#8220;4. Enter Windows Serial number&#8221; textbox, you may provide a serial but this is optional.</li>
<li>Now, click the &#8220;5. Generate the SYSANGEL DVD ISO&#8221; button. Of course, we don&#8217;t really need the ISO image that will be generated, but we do need the software to download or update files used to generate the ISO. We also need the DVD Generator to prepare the Windows release.</li>
<li>When everything is done, click the &#8220;Finished the custom. Generate the ISO!&#8221; button and wait&#8230; until you get to the final screen :</li>
<li>The C:\OUTPUT folder should be all right. If you want to install Windows with a bootable DVD at a later date, burn the ISO (C:\OUTPUT\DVD.iso). Else, you can simply delete this file.</li>
<li>If DVD Generator fails to burn the DVD.iso try using your favourite burning software, you can now close the DVD Generator.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.lockstockmods.net/2008/04/25/install-windows-over-network-with-pxe/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Apache Cheatsheet</title>
		<link>http://www.lockstockmods.net/2008/04/11/apache-cheatsheet/</link>
		<comments>http://www.lockstockmods.net/2008/04/11/apache-cheatsheet/#comments</comments>
		<pubDate>Fri, 11 Apr 2008 12:25:50 +0000</pubDate>
		<dc:creator>Kode</dc:creator>
		
		<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://www.lockstockmods.net/?p=31</guid>
		<description><![CDATA[Setup a Virtual Domain
NameVirtualHost *
&#60;VirtualHost *&#62;
DocumentRoot /web/example.com/www
ServerName www.example.com
<em>ServerAlias example.com
CustomLog /web/example.com/logs/access.log combined
ErrorLog /web/example.com/logs/error.log</em>
&#60;/VirtualHost&#62;]]></description>
			<content:encoded><![CDATA[<p><strong>Setup a Virtual Domain</strong></p>
<pre><code>NameVirtualHost *
&lt;VirtualHost *&gt;
DocumentRoot /web/example.com/www
ServerName www.example.com
<em>ServerAlias example.com
CustomLog /web/example.com/logs/access.log combined
ErrorLog /web/example.com/logs/error.log</em>
&lt;/VirtualHost&gt;</code></pre>
<p><strong>Include another conf file</strong></p>
<pre><code>Include /etc/apache/virtual-hosts/*.conf</code></pre>
<p><strong>Hide apache version info</strong></p>
<pre><code>ServerSignature Off
ServerTokens Prod</code></pre>
<p><strong>Custom 404 Error message</strong></p>
<pre><code>ErrorDocument 404 /404.html</code></pre>
<p><strong>Create a virtual directory (mod_alias)</strong></p>
<pre><code>Alias /common /web/common</code></pre>
<p><strong>Perminant redirect (mod_alias)</strong></p>
<pre><code>Redirect permanent /old http://example.com/new</code></pre>
<p><strong>Create a cgi-bin</strong></p>
<pre><code>ScriptAlias /cgi-bin/ /web/cgi-bin/</code></pre>
<p><strong>Process .cgi scripts</strong></p>
<pre><code>AddHandler cgi-script .cgi</code></pre>
<p><strong>Add a directory index</strong></p>
<pre><code>DirectoryIndex index.cfm index.cfm</code></pre>
<p><strong>Turn off directory browsing</strong></p>
<pre><code>Options -Indexes</code></pre>
<p><strong>Turn on directory browsing</strong></p>
<pre><code>&lt;Location /images&gt;
Options +Indexes
&lt;/Location&gt;</code></pre>
<p><strong>Create a new user for basic auth <em>(command line)</em></strong></p>
<pre><code>htpasswd -c /etc/apacheusers</code></pre>
<p><strong>Apache basic authentication</strong></p>
<pre><code>AuthName "Authentication Required"
AuthType Basic
AuthUserFile /etc/apacheusers
Require valid-user</code></pre>
<p><strong>Only allow access from a specific IP</strong></p>
<pre><code>Order Deny,Allow
Deny from all
Allow from 127.0.0.1</code></pre>
<p><strong>Only allow access from your subnet</strong></p>
<pre><code>Order Deny,Allow
Deny from all
Allow from 176.16.0.0/16</code></pre>
<p>From http://www.petefreitag.com/cheatsheets/apache/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lockstockmods.net/2008/04/11/apache-cheatsheet/feed/</wfw:commentRss>
		</item>
		<item>
		<title>htaccess Cheat Sheet</title>
		<link>http://www.lockstockmods.net/2008/04/11/htaccess-cheat-sheet/</link>
		<comments>http://www.lockstockmods.net/2008/04/11/htaccess-cheat-sheet/#comments</comments>
		<pubDate>Fri, 11 Apr 2008 12:17:47 +0000</pubDate>
		<dc:creator>Kode</dc:creator>
		
		<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://www.lockstockmods.net/?p=30</guid>
		<description><![CDATA[Here is a simple cheatsheet for the .htaccess file:

Enable Directory Browsing
Options +Indexes
## block a few types of files from showing
IndexIgnore *.wmv *.mp4 *.avi
Disable Directory Browsing
Options All -Indexes]]></description>
			<content:encoded><![CDATA[<p>Here is a simple cheatsheet for the .htaccess file:</p>
<p><strong>Enable Directory Browsing</strong></p>
<pre><code>Options +Indexes
## block a few types of files from showing
IndexIgnore *.wmv *.mp4 *.avi
</code></pre>
<p><strong>Disable Directory Browsing</strong></p>
<pre><code>Options All -Indexes
</code></pre>
<pre>ErrorDocument 403 http://www.htaccesselite.com
Order deny,allow
Deny from all
Allow from 1.1.1.1</pre>
<p><strong>Redirect all but 1 IP to different site, using mod_rewrite</strong></p>
<pre><code>RewriteEngine On
RewriteBase /
RewriteCond %{REMOTE_HOST} !^1\.1\.1\.1
RewriteRule .* http://www.htaccesselite.com [R=302,L]</code></pre>
<p><strong>Redirect Everyone but you to alternate page on your server.</strong></p>
<pre><code>RewriteEngine On
RewriteBase /
RewriteCond %{REMOTE_HOST} !^1\.1\.1\.1
RewriteCond %{REQUEST_URI} !/temporary-offline\.html$
RewriteRule .* /temporary-offline.html [R=302,L]</code></pre>
<p><strong>Customize Error Messages</strong></p>
<pre><code>ErrorDocument 403 /forbidden.html
ErrorDocument 404 /notfound.html
ErrorDocument 500 /servererror.html
</code></pre>
<p><strong>Get <span class="caps">SSI</span> working with HTML/SHTML</strong></p>
<pre><code>AddType text/html .html
AddType text/html .shtml
AddHandler server-parsed .html
AddHandler server-parsed .shtml
# AddHandler server-parsed .htm
</code></pre>
<p><strong>Change Default Page (order is followed!)</strong></p>
<pre><code>DirectoryIndex myhome.htm index.htm index.php
</code></pre>
<p><strong>Block Users from accessing the site</strong></p>
<pre><code>&lt;limit GET POST PUT&gt;
order deny,allow
deny from 202.54.122.33
deny from 8.70.44.53
deny from .spammers.com
allow from all
&lt;/limit&gt;
</code></pre>
<p><strong>Allow only <span class="caps">LAN</span> users</strong></p>
<pre><code>order deny,allow
deny from all
allow from 192.168.0.0/24
</code></pre>
<p><strong>Redirect Visitors to New Page/Directory</strong></p>
<pre><code>Redirect oldpage.html http://www.domainname.com/newpage.html
Redirect /olddir http://www.domainname.com/newdir/
</code></pre>
<p><strong>Block site from specific referrers</strong></p>
<pre><code>RewriteEngine on
RewriteCond %{HTTP_REFERER} site-to-block\.com [NC]
RewriteCond %{HTTP_REFERER} site-to-block-2\.com [NC]
RewriteRule .* - [F]
</code></pre>
<p><strong>Block Hot Linking/Bandwidth hogging</strong></p>
<pre><code>RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com/.*$ [NC]
RewriteRule \.(gif|jpg)$ - [F]
</code></pre>
<p><strong>Want to show a “Stealing is Bad” message too?</strong></p>
<p>Add this below the <em>Hot Link Blocking</em> code:</p>
<pre><code>RewriteRule \.(gif|jpg)$ http://www.mydomain.com/dontsteal.gif [R,L]
</code></pre>
<p><strong>Stop .htaccess (or any other file) from being viewed</strong></p>
<pre><code>&lt;files file-name&gt;
order allow,deny
deny from all
&lt;/files&gt;
</code></pre>
<p><strong>Avoid the 500 Error</strong></p>
<pre><code># Avoid 500 error by passing charset
AddDefaultCharset utf-8
</code></pre>
<p><strong>Grant <span class="caps">CGI</span> Access in a directory</strong></p>
<pre><code>Options +ExecCGI
AddHandler cgi-script cgi pl
# To enable all scripts in a directory use the following
# SetHandler cgi-script
</code></pre>
<p><strong>Password Protecting Directories</strong></p>
<p>Use the <a href="http://thejackol.com/scripts/htpasswdgen.php" onclick="javascript:pageTracker._trackPageview('/outbound/article/thejackol.com');">.htaccess Password Generator</a> and follow the brief instructions!</p>
<p><strong>Change Script Extensions</strong></p>
<pre><code>AddType application/x-httpd-php .gne
</code></pre>
<p><code>gne</code> will now be treated as <span class="caps">PHP</span> files! Similarly, <code>x-httpd-cgi</code> for <span class="caps">CGI</span> files, etc.</p>
<p><strong>Use MD5 Digests</strong></p>
<p>Performance may take a hit but if thats not a problem, this is a nice option to turn on.</p>
<pre><code>ContentDigest On
</code></pre>
<p><strong>The CheckSpelling Directive</strong></p>
<p>From Jens Meiert: CheckSpelling corrects simple spelling errors (for example, if someone forgets a letter or if any character is just wrong). Just add <code>CheckSpelling On</code> to your htaccess file.</p>
<p><strong>The ContentDigest Directive</strong></p>
<p>As the Apache core features documentation says: “This directive enables the generation of Content-MD5 headers as defined in <a href="http://www.ietf.org/rfc/rfc1864.txt" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.ietf.org');">RFC1864</a> respectively <a href="http://www.ietf.org/rfc/rfc2068.txt" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.ietf.org');">RFC2068</a>. The Content-MD5 header provides an end-to-end message integrity check (<span class="caps">MIC</span>) of the entity-body. A proxy or client may check this header for detecting accidental modification of the entity-body in transit.</p>
<p>Note that this can cause performance problems on your server since the message digest is computed on every request (the values are not cached). Content-MD5 is only sent for documents served by the core, and not by any module. For example, <span class="caps">SSI</span> documents, output from <span class="caps">CGI</span> scripts, and byte range responses do not have this header.”</p>
<p>To turn this on, just add <code>ContentDigest On</code>.</p>
<p><strong>Save Bandwidth</strong></p>
<pre><code># Only if you use PHP
&lt;ifmodule mod_php4.c&gt;
php_value zlib.output_compression 16386
&lt;/ifmodule&gt;
</code></pre>
<p><strong>Turn off <code>magic_quotes_gpc</code></strong></p>
<pre><code># Only if you use PHP
&lt;ifmodule mod_php4.c&gt;
php_flag magic_quotes_gpc off
&lt;/ifmodule&gt;</code></pre>
<p>Taken from http://www.thejackol.com/htaccess-cheatsheet/</p>
<p> The Options directive controls which server features are available in a particular directory.</p>
<p>option can be set to None, in which case none of the extra features are enabled, or one or more of the following:</p>
<p>All<br />
    All options except for MultiViews. This is the default setting.<br />
ExecCGI<br />
    Execution of CGI scripts is permitted.<br />
FollowSymLinks<br />
    The server will follow symbolic links in this directory.<br />
    Note: even though the server follows the symlink it does not change the pathname used to match against &lt;Directory&gt; sections.<br />
    Note: this option gets ignored if set inside a &lt;Location&gt; section.<br />
Includes<br />
    Server-side includes are permitted.<br />
IncludesNOEXEC<br />
    Server-side includes are permitted, but the #exec command and #exec CGI are disabled. It is still possible to #include virtual CGI scripts from ScriptAliase&#8217;d directories.<br />
Indexes<br />
    If a URL which maps to a directory is requested, and the there is no DirectoryIndex (e.g., index.html) in that directory, then the server will return a formatted listing of the directory.<br />
MultiViews<br />
    Content negotiated MultiViews are allowed.<br />
SymLinksIfOwnerMatch<br />
    The server will only follow symbolic links for which the target file or directory is owned by the same user id as the link.<br />
    Note: this option gets ignored if set inside a &lt;Location&gt; section.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lockstockmods.net/2008/04/11/htaccess-cheat-sheet/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
