<?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>Nation Pigeon</title>
	<atom:link href="http://nationpigeon.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://nationpigeon.com</link>
	<description>The Nations Favourite Pigeon.</description>
	<lastBuildDate>Sun, 15 Apr 2012 19:19:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Check Apache2 CGI is working</title>
		<link>http://nationpigeon.com/check-apache2-cgi-is-working/</link>
		<comments>http://nationpigeon.com/check-apache2-cgi-is-working/#comments</comments>
		<pubDate>Sun, 15 Apr 2012 19:19:43 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Apache2]]></category>
		<category><![CDATA[CGI]]></category>

		<guid isPermaLink="false">http://nationpigeon.com/?p=790</guid>
		<description><![CDATA[echo -e '#!/usr/bin/perl\nprint "Content-type: text/plain\\n\\n";\nprint "It works!\\n";'&#124;sudo tee /usr/lib/cgi-bin/test.pl sudo chmod 755 /usr/lib/cgi-bin/test.pl echo -e "GET /cgi-bin/test.pl HTTP/1.0\n"&#124;nc -q 1 127.0.0.1 80]]></description>
			<content:encoded><![CDATA[<pre>echo -e '#!/usr/bin/perl\nprint "Content-type: text/plain\\n\\n";\nprint "It works!\\n";'|sudo tee /usr/lib/cgi-bin/test.pl
sudo chmod 755 /usr/lib/cgi-bin/test.pl
echo -e "GET /cgi-bin/test.pl HTTP/1.0\n"|nc -q 1 127.0.0.1 80</pre>
]]></content:encoded>
			<wfw:commentRss>http://nationpigeon.com/check-apache2-cgi-is-working/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache Remove Server Signature</title>
		<link>http://nationpigeon.com/apache-remove-server-signature/</link>
		<comments>http://nationpigeon.com/apache-remove-server-signature/#comments</comments>
		<pubDate>Wed, 21 Mar 2012 22:56:35 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security through obscurity]]></category>

		<guid isPermaLink="false">http://nationpigeon.com/?p=787</guid>
		<description><![CDATA[Apache&#8217;s signature is the small block of text identifiying the running version of Apache, OS Running and modules installed. Example of a server signature: Apache/2.2.16 (Debian) PHP/5.3.10-1 Server at nationpigeon.com Port 80 To remove this you need to edit &#8220;/etc/apache2/conf.d/security&#8221; to show &#8220;ServerSignature Off&#8220;. You might want to play around with ServerTokens which limits the [...]]]></description>
			<content:encoded><![CDATA[<p>Apache&#8217;s signature is the small block of text identifiying the running version of Apache, OS Running and modules installed.</p>
<p>Example of a server signature:</p>
<pre>
Apache/2.2.16 (Debian) PHP/5.3.10-1 Server at nationpigeon.com Port 80
</pre>
<p>To remove this you need to edit &#8220;<b>/etc/apache2/conf.d/security</b>&#8221; to show &#8220;<b>ServerSignature Off</b>&#8220;.</p>
<p>You might want to play around with ServerTokens which limits the amount of infromation returned in the server HTTP header.</p>
]]></content:encoded>
			<wfw:commentRss>http://nationpigeon.com/apache-remove-server-signature/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clone a Harddrive Linux</title>
		<link>http://nationpigeon.com/clone-a-harddrive-linux/</link>
		<comments>http://nationpigeon.com/clone-a-harddrive-linux/#comments</comments>
		<pubDate>Sun, 04 Mar 2012 23:51:46 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[clone]]></category>
		<category><![CDATA[dd]]></category>
		<category><![CDATA[hard drive]]></category>
		<category><![CDATA[Restore]]></category>

		<guid isPermaLink="false">http://nationpigeon.com/?p=783</guid>
		<description><![CDATA[Using dd you can make a bit for bit clone of a harddrive/partition. dd takes two parameters. if, the source and of, the destination. dd if=/dev/sda of=~/backup.img This will make a copy of the entire disk, if you were to put sda1 you&#8217;d get the first partition. Make sure to only run these commands when [...]]]></description>
			<content:encoded><![CDATA[<p>Using dd you can make a bit for bit clone of a harddrive/partition. </p>
<p>dd takes two parameters. if, the source and of, the destination.</p>
<pre>dd if=/dev/sda of=~/backup.img</pre>
<p>This will make a copy of the entire disk, if you were to put sda1 you&#8217;d get the first partition. </p>
<p>Make sure to only run these commands when there is no activitiy on the disk. If you are using LVM you can make a snapshot of the data and run it against that.</p>
<p>Once the backup is complete you can compress it and store it like a normal file.</p>
<p>To restore the data you simply reverse the arguments.</p>
<pre>dd if=~/backup.img of=/dev/sda</pre>
]]></content:encoded>
			<wfw:commentRss>http://nationpigeon.com/clone-a-harddrive-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Restoring MySQL from data files</title>
		<link>http://nationpigeon.com/restoring-mysql-for-data-files/</link>
		<comments>http://nationpigeon.com/restoring-mysql-for-data-files/#comments</comments>
		<pubDate>Sat, 18 Feb 2012 21:12:57 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Restore]]></category>

		<guid isPermaLink="false">http://nationpigeon.com/?p=766</guid>
		<description><![CDATA[MySQL stores all its data in the following location /var/lib/mysql/&#60;database&#62; Simply make a copy of these files and you have a backup, when restoring make sure its owned by mysql.]]></description>
			<content:encoded><![CDATA[<p>MySQL stores all its data in the following location<br />
<strong>/var/lib/mysql/&lt;database&gt;</strong><br />
Simply make a copy of these files and you have a backup, when restoring make sure its owned by mysql.</p>
]]></content:encoded>
			<wfw:commentRss>http://nationpigeon.com/restoring-mysql-for-data-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Adding a database and table</title>
		<link>http://nationpigeon.com/mysql-adding-a-database-and-table/</link>
		<comments>http://nationpigeon.com/mysql-adding-a-database-and-table/#comments</comments>
		<pubDate>Sat, 18 Feb 2012 18:09:44 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://nationpigeon.com/?p=764</guid>
		<description><![CDATA[Log in with a user which has the correct privileges mysql> CREATE DATABASE port22; Query OK, 1 row affected (0.00 sec) Change to the new database. mysql> use port22; Database changed Create a new table with an auto increment ID, password and email fields. mysql> CREATE TABLE user ( -> id TINYINT NOT NULL AUTO_INCREMENT [...]]]></description>
			<content:encoded><![CDATA[<p>Log in with a user which has the correct privileges</p>
<pre>
mysql> CREATE DATABASE port22;
Query OK, 1 row affected (0.00 sec)
</pre>
<p>Change to the new database.</p>
<pre>
mysql> use port22;
Database changed
</pre>
<p>Create a new table with an auto increment ID, password and email fields.</p>
<p><PRE>
mysql> CREATE TABLE user (
    -> id TINYINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
    -> pass VARCHAR(64),
    -> email VARCHAR(255)
    -> );
Query OK, 0 rows affected (0.00 sec)
</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://nationpigeon.com/mysql-adding-a-database-and-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xrandr 1080p</title>
		<link>http://nationpigeon.com/xrandr-1080p/</link>
		<comments>http://nationpigeon.com/xrandr-1080p/#comments</comments>
		<pubDate>Thu, 09 Feb 2012 19:54:11 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mint 12]]></category>
		<category><![CDATA[Screen Resolution]]></category>
		<category><![CDATA[Xorg]]></category>

		<guid isPermaLink="false">http://nationpigeon.com/?p=757</guid>
		<description><![CDATA[xrandr --newmode "1920x1080_50.00" 141.50 1920 2032 2232 2544 1080 1083 1088 1114 -hsync +vsync xrandr --addmode VGA1 1920x1080_50.00 xrandr --output VGA1 --mode "1920x1080_50.00" With many thanks to this blog post. (Link)]]></description>
			<content:encoded><![CDATA[<pre>
xrandr --newmode "1920x1080_50.00" 141.50 1920 2032 2232 2544 1080 1083 1088 1114 -hsync +vsync
xrandr --addmode VGA1  1920x1080_50.00
xrandr --output VGA1 --mode "1920x1080_50.00"
</pre>
<p>With many thanks to this blog post. (<a href="http://www.tolaris.com/2009/04/14/enabling-1080p-video-on-the-shuttle-x27d-htpc/" target="_BLANK">Link</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://nationpigeon.com/xrandr-1080p/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick and diry way to set-up shared web hosting.</title>
		<link>http://nationpigeon.com/quick-and-diry-way-to-set-up-shared-web-hosting/</link>
		<comments>http://nationpigeon.com/quick-and-diry-way-to-set-up-shared-web-hosting/#comments</comments>
		<pubDate>Sun, 29 Jan 2012 21:21:36 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[shared web hsoting]]></category>

		<guid isPermaLink="false">http://nationpigeon.com/?p=755</guid>
		<description><![CDATA[I have a web server running lighttpd and I have a few sites I want to run from it. This is what I did to enable &#8220;shared&#8221; web hosting with separate user login. Fist create a new user for the domain. useradd newDomain Add this user to the www-data group usermod -a -G www-data newDomain [...]]]></description>
			<content:encoded><![CDATA[<p>I have a web server running <a href="http://www.lighttpd.net/" target="_BLANK">lighttpd</a> and I have a few sites I want to run from it. This is what I did to enable &#8220;shared&#8221; web hosting with separate user login.</p>
<p>Fist create a new user for the domain.</p>
<pre>useradd newDomain</pre>
<p>Add this user to the www-data group</p>
<pre>usermod -a -G www-data newDomain</pre>
<p>Create the virtual domain in lightys config.</p>
<pre>
$HTTP["host"] =~ "(^|\.)newDomain\.co.uk$" {
        server.document-root = "/var/www/newDomain/"
        server.errorlog = "/var/log/lighttpd/newDomain/error.log"
        accesslog.filename = "/var/log/lighttpd/newDomian/access.log"
        server.error-handler-404 = "/e404.php"
}
</pre>
<p>Link the web root to the home directory.</p>
<pre>ln -s /var/www/newDomain /home/NewDomain/public_html</pre>
<p>And the log files.</p>
<pre>ln -s /var/log/lighttpd/newDomain /home/NewDomain/logs</pre>
<p>Login as the new user and navigate to public_html, and you good to go. </p>
]]></content:encoded>
			<wfw:commentRss>http://nationpigeon.com/quick-and-diry-way-to-set-up-shared-web-hosting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remotly generate windows event logs</title>
		<link>http://nationpigeon.com/remotly-get-windows-log-files/</link>
		<comments>http://nationpigeon.com/remotly-get-windows-log-files/#comments</comments>
		<pubDate>Sun, 18 Dec 2011 13:42:45 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Event Logs]]></category>
		<category><![CDATA[log]]></category>
		<category><![CDATA[Remotly]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">http://nationpigeon.com/?p=620</guid>
		<description><![CDATA[To remotly generate log output: (Note the file will be created on the remote machine) wevtutil epl /r:192.168.0.111 System C:\output.evtx You can then view it using event viewer. You can replace System with any of the event logs. e.g. Application, Security and Setup. Reference technet.microsoft.com]]></description>
			<content:encoded><![CDATA[<p>To remotly generate log output: (Note the file will be created on the remote machine) </p>
<pre>wevtutil epl /r:192.168.0.111 System  C:\output.evtx</pre>
<p>You can then view it using event viewer.  You can replace System with any of the event logs. e.g. Application, Security and Setup. </p>
<p>Reference<br />
<a href="http://technet.microsoft.com/en-us/library/cc766438.aspx" target="_BLANK">technet.microsoft.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://nationpigeon.com/remotly-get-windows-log-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Set keyboard mapping via CLI</title>
		<link>http://nationpigeon.com/set-keyboard-mapping-via-cli/</link>
		<comments>http://nationpigeon.com/set-keyboard-mapping-via-cli/#comments</comments>
		<pubDate>Sun, 18 Dec 2011 13:25:28 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[keyboad mapping]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[X11]]></category>

		<guid isPermaLink="false">http://nationpigeon.com/?p=601</guid>
		<description><![CDATA[If you&#8217;ve just installed a fresh copy of *Unix or your using a Live distro. I find this command much easier that looking though all the menus. setxkbmap gb Aslong as your running X.org, you&#8217;r in luck.]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve just installed a fresh copy of *Unix or your using a Live distro.<br />
I find this command much easier that looking though all the menus.</p>
<pre>setxkbmap gb</pre>
<p>Aslong as your running X.org, you&#8217;r in luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://nationpigeon.com/set-keyboard-mapping-via-cli/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL manage users</title>
		<link>http://nationpigeon.com/add-mysql-user/</link>
		<comments>http://nationpigeon.com/add-mysql-user/#comments</comments>
		<pubDate>Sun, 18 Dec 2011 13:21:11 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[adding user]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://nationpigeon.com/?p=626</guid>
		<description><![CDATA[To view all users. SELECT user FROM mysql.user; To add a MySQL user which is able to connect only from the local machine, and have access only to a database called soup. # mysql -u root -p INSERT INTO mysql.user (Host,User,Password) VALUES('localhost','username',PASSWORD('password')); GRANT USAGE ON *.* to username@localhost IDENTIFIED BY 'password'; FLUSH PRIVILEGES; GRANT ALL [...]]]></description>
			<content:encoded><![CDATA[<p>To view all users.<br />
<PRE>SELECT user FROM mysql.user;</pre></p>
<p>To add a MySQL user which is able to connect only from the local machine, and have access only to a database called soup.</p>
<pre># mysql -u root -p
INSERT INTO mysql.user (Host,User,Password) VALUES('localhost','username',PASSWORD('password'));
GRANT USAGE ON *.* to username@localhost IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
GRANT ALL PRIVILEGES ON soup.* TO username@localhost;
FLUSH PRIVILEGES;</pre>
<p>If you don&#8217;t run the first &#8220;FLUSH PRIVILEGES;&#8221; statemtnt you might get the following error:
<pre>ERROR 1133 (42000): Can't find any matching row in the user table</pre>
<p>To delete users </p>
<pre>DELETE FROM mysql.user WHERE User='username';
FLUSH PRIVILEGES;</pre>
<p>A really got site to look up MySQL commands is: <a href="http://www.pantz.org/software/mysql/mysqlcommands.html" target="_BLANK">pantz.org</a></p>
]]></content:encoded>
			<wfw:commentRss>http://nationpigeon.com/add-mysql-user/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

