<?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>Rafadamar!! &#187; Tutorials</title>
	<atom:link href="http://rafadamar.com/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://rafadamar.com</link>
	<description>Hate me for who I am not who you think I am.</description>
	<lastBuildDate>Sat, 28 Jan 2012 02:12:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>HowTo: Integrate Privatemsg with the Flag and jQuery_Impromptu modules</title>
		<link>http://rafadamar.com/2010/05/howto-integrate-privatemsg-with-the-flag-and-jquery_impromptu-modules/</link>
		<comments>http://rafadamar.com/2010/05/howto-integrate-privatemsg-with-the-flag-and-jquery_impromptu-modules/#comments</comments>
		<pubDate>Thu, 13 May 2010 01:36:19 +0000</pubDate>
		<dc:creator>Ralph</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[drupal 6]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://rafadamar.com/?p=97</guid>
		<description><![CDATA[I needed a way for a user to be prompted to send a message to the author of a node after it was flagged. This was my solution. jQuery Impromptu provides a nice way of implementing a pop-up feature. Flag of course flags a node. &#60;?php // Load necessary to avoid error module_load_include('pages.inc','privatemsg'); // Adds [...]]]></description>
			<content:encoded><![CDATA[<p>I needed a way for a user to be prompted to send a message to the author of a node after it was flagged. This was my solution.</p>
<p><a href="http://drupal.org/project/jquery_impromptu">jQuery</a> Impromptu provides a nice way of implementing a pop-up feature.<br />
<a href="http://drupal.org/project/flag">Flag</a> of course flags a node.</p>
<pre class="brush: php">&lt;?php
  // Load necessary to avoid error
  module_load_include('pages.inc','privatemsg');

  // Adds javascript to header
  jquery_impromptu_add();

  // Gets rid of whitespaces that break javascript code
  // drupal_get_form retrieves the privatemsg form
  // $uid is the author of the node
  // $title is the title of the node
  $form = str_replace("\r", '', str_replace("\n", '', drupal_get_form('privatemsg_new', $uid, $title)));

  // javascript that runs jquery_impromptu on flag event
  print '&lt;script language="javascript"&gt;';
  print "
  $(document).bind('flagGlobalAfterLinkUpdate', function(event, data) {
    if(data.flagStatus == 'flagged'){
      $.prompt('$form');
    }
  });
  ";
  print '&lt;/script&gt;';

  // Necessary because previous module_load_include changes title
  drupal_set_title(check_plain($node-&gt;title));
?&gt;
</pre>
<p>For more information on how you can customize the privatemsg form, look here <a href="http://drupal.org/node/624528">http://drupal.org/node/624528</a></p>
]]></content:encoded>
			<wfw:commentRss>http://rafadamar.com/2010/05/howto-integrate-privatemsg-with-the-flag-and-jquery_impromptu-modules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Script to Check If a Site is Up</title>
		<link>http://rafadamar.com/2009/11/php-script-to-check-if-a-site-is-up/</link>
		<comments>http://rafadamar.com/2009/11/php-script-to-check-if-a-site-is-up/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 22:10:12 +0000</pubDate>
		<dc:creator>Ralph</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[drupal 6]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I needed to develop this script in order to check whether or not my streaming media server was up. At first, I tried to use PHP&#8217;s system function with BASH&#8217;s wget, but that wasn&#8217;t working. I ended up using PHP&#8217;s file_get_contents. &#60;?php function chkuri($link){ //$link is the website which i am checking // If file_get_contents [...]]]></description>
			<content:encoded><![CDATA[<p>I needed to develop this script in order to check whether or not my streaming media server was up. At first, I tried to use PHP&#8217;s system function with BASH&#8217;s wget, but that wasn&#8217;t working. I ended up using PHP&#8217;s file_get_contents.</p>
<pre class="brush:php">
&lt;?php
function chkuri($link){
//$link is the website which i am checking
// If file_get_contents failed to retrieve
// the page, it's not up
  if(!file_get_contents($link)){
    return 'I\'m sorry, but the Ampache server is down. :(';
// It is up
  }else{
    return 'It\'s up! &lt;a href="'.$link.'"&gt;Click here to go!&lt;/a&gt;';
  }
}
print '&lt;h2&gt;'.chkuri('http://martinez.homelinux.org/ampache').'&lt;/h2&gt;';
?&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://rafadamar.com/2009/11/php-script-to-check-if-a-site-is-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Display Taxonomy Block on blog page, blog entries, and blog terms</title>
		<link>http://rafadamar.com/2009/11/display-taxonomy-block-on-blog-page-blog-entries-and-blog-terms/</link>
		<comments>http://rafadamar.com/2009/11/display-taxonomy-block-on-blog-page-blog-entries-and-blog-terms/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 03:03:38 +0000</pubDate>
		<dc:creator>Ralph</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[drupal 6]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[You will need to download and install one module and its dependencies for this to work. Download the Advanced Taxonomy Blocks module &#38; install it. In your terminal enter: wget http://ftp.drupal.org/files/projects/taxonomyblocks-6.x-1.8.tar.gz tar xfvz taxonomyblocks-6.x-1.8.tar.gz Repeat for its dependencies. Configure your block Once installed, you can configure Taxonomy blocks. You can do so by going to [...]]]></description>
			<content:encoded><![CDATA[<p>You will need to download and install one module and its dependencies for this to work.</p>
<h3>Download the <a href="http://drupal.org/project/taxonomyblocks">Advanced Taxonomy Blocks module</a> &amp; install it.</h3>
<p>In your terminal enter:</p>
<pre class="brush: bash">
wget http://ftp.drupal.org/files/projects/taxonomyblocks-6.x-1.8.tar.gz
tar xfvz taxonomyblocks-6.x-1.8.tar.gz
</pre>
<p>Repeat for its dependencies.</p>
<h3>Configure your block</h3>
<p>Once installed, you can configure Taxonomy blocks. You can do so by going to your administration page and selecting &#8216;Advanced Taxonomy Blocks configuration&#8217; under the &#8216;Site Configuration&#8217; section.</p>
<h3>Set visibilty settings with PHP</h3>
<p>Now, enable the block you just configured in the Blocks page. For the &#8216;Page specific visibility settings&#8217;, select the PHP-mode. Remember to substitute the vocabulary IDs for the <a href="http://api.drupal.org/api/function/taxonomy_get_tree/6">taxonomy_get_tree function</a>.</p>
<p>Enter the following PHP code:</p>
<pre class="brush: bash">&lt;?php
// If node-&gt;type == blog
if(arg(0) == 'node' &amp;&amp; is_numeric(arg(1))){
  $node = node_load((1))</span>;
    if($node-&gt;type == 'blog'){
      return TRUE;
    }
    // Main blog page
    }else if(arg(0) == 'blog'){
      return TRUE;
    // On tag page that is a blog tag
    }else if(arg(0) == 'taxonomy' &amp;&amp; is_numeric(arg(2))){
      $tid = arg(2);
      $tree1 = taxonomy_get_tree(1);
      $tree2 = taxonomy_get_tree(2);
      foreach($tree1 as $term){
        if($term-&gt;tid == $tid){
          return TRUE;
        }
      }
      foreach($tree2 as $term){
        if($term-&gt;tid == $tid){
         return TRUE;
        }
      }
    }else{
      return FALSE;
    }
  return FALSE;
}
?&gt;
</pre>
<p>If everything&#8217;s working, you should be able to see the taxonomy of the blog page, term pages associated with the blog, and on every blog entry.</p>
]]></content:encoded>
			<wfw:commentRss>http://rafadamar.com/2009/11/display-taxonomy-block-on-blog-page-blog-entries-and-blog-terms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Intel 82801DB AC&#8217;97 audio controller issue</title>
		<link>http://rafadamar.com/2009/09/intel-82801db-ac97-audio-controller-issue/</link>
		<comments>http://rafadamar.com/2009/09/intel-82801db-ac97-audio-controller-issue/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 12:23:00 +0000</pubDate>
		<dc:creator>Ralph</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[So Nietzsche and Camus both use this Intel audio driver. Alsa messes up the audio for some reason and there is no sound. I found a fix though: https://www.redhat.com/archives/fedora-list/2005-January/msg05487.html Basically, all you have to do is open up a terminal and run this: alsamixer You can switch between the things using the left and right [...]]]></description>
			<content:encoded><![CDATA[<p>So Nietzsche and Camus both use this Intel audio driver. Alsa messes up the audio for some reason and there is no sound.</p>
<p>I found a fix though: <a href="https://www.redhat.com/archives/fedora-list/2005-January/msg05487.html">https://www.redhat.com/archives/fedora-list/2005-January/msg05487.html</a></p>
<p>Basically, all you have to do is open up a terminal and run this:</p>
<pre class="brush: bash">alsamixer</pre>
<p>You can switch between the things using the left and right arrows. Press m to mute or unmute it.</p>
<p>In addition to muting the headphone jack and line jack, I muted the external. If that doesn&#8217;t work for you, just mess around muting and unmuting stuff.</p>
]]></content:encoded>
			<wfw:commentRss>http://rafadamar.com/2009/09/intel-82801db-ac97-audio-controller-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nietzsche: VPN Server</title>
		<link>http://rafadamar.com/2009/09/nietzsche-vpn-server/</link>
		<comments>http://rafadamar.com/2009/09/nietzsche-vpn-server/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 02:39:00 +0000</pubDate>
		<dc:creator>Ralph</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Nietzsche is up and running as a VPN server! I used pptpd. Nietzsche is running Xubuntu Hardy Heron. Install sudo apt-get install pptpd Add Users sudo vim /etc/ppp/chap-secrets The format is: username pptpd password Edit pptpd.conf sudo vim /etc/pptpd.conf Add lines similar to these localip 192.168.1.72 remoteip 192.168.1.200-253 localip is the IP for the VPN [...]]]></description>
			<content:encoded><![CDATA[<p>Nietzsche is up and running as a VPN server!</p>
<p>I used pptpd. Nietzsche is running Xubuntu Hardy Heron.</p>
<div class="separator" style="clear: both; text-align: center;"><a style="margin-left: 1em; margin-right: 1em;" href="http://2.bp.blogspot.com/_qbVemWvXrxk/Sq6hDIxdXTI/AAAAAAAAAmw/PFMBn3uw1WI/s1600/P9140092.JPG"><img class="mceItem" src="http://2.bp.blogspot.com/_qbVemWvXrxk/Sq6hDIxdXTI/AAAAAAAAAmw/PFMBn3uw1WI/s320/P9140092.JPG" border="0" alt="" /></a></div>
<h2>Install</h2>
<pre class="brush: bash">
sudo apt-get install pptpd
</pre>
<h2>Add Users</h2>
<pre class="brush: bash">
sudo vim /etc/ppp/chap-secrets
</pre>
<p>The format is:</p>
<pre class="brush: bash">username pptpd password</pre>
<h2>Edit pptpd.conf</h2>
<pre class="brush: bash">
sudo vim /etc/pptpd.conf
</pre>
<p>Add lines similar to these</p>
<pre class="brush: bash">
localip 192.168.1.72</pre>
<p>remoteip 192.168.1.200-253
</pre>
<p>localip is the IP for the VPN server. remoteip are the IPs that will be given to the VPN clients. I'm using unused IPs.</p>
<h2>Edit pptpd-options</h2>
<pre class="brush: bash">
sudo vim /etc/ppp/pptpd-options
</pre>
<p>Uncomment #ms-dns 10.0.0.1. Change 10.0.0.1 to your DNS server or router</p>
<h2>Edit sysctl</h2>
<pre class="brush: bash">
sudo vim /etc/sysctl.conf
</pre>
<p>Add the following lines</p>
<pre class="brush: bash">
net.ipv4.conf.default.forwarding=1
net.ipv4.conf.all.forwarding=1
</pre>
<h2>Restart</h2>
<pre class="brush: bash">
sudo /etc/init.d/pptpd restart
</pre>
<p>Your server should be up and running.</p>
]]></content:encoded>
			<wfw:commentRss>http://rafadamar.com/2009/09/nietzsche-vpn-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PXE Xubuntu Hardy Heron Server</title>
		<link>http://rafadamar.com/2009/09/pxe-xubuntu-hardy-heron-server/</link>
		<comments>http://rafadamar.com/2009/09/pxe-xubuntu-hardy-heron-server/#comments</comments>
		<pubDate>Sun, 06 Sep 2009 06:07:00 +0000</pubDate>
		<dc:creator>Ralph</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[pxe]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[So, I&#8217;m creating a home network out of old spare computers. I have two old laptops and one old tower. I will be installing various servers on each. Currently, my tower has Xubuntu Hardy Heron installed. One laptop I can&#8217;t touch till I find a way to get into and save the files. The other [...]]]></description>
			<content:encoded><![CDATA[<p>So, I&#8217;m creating a home network out of old spare computers. I have two old laptops and one old tower. I will be installing various servers on each.</p>
<p>Currently, my tower has Xubuntu Hardy Heron installed. One laptop I can&#8217;t touch till I find a way to get into and save the files. The other laptop is problematic because it doesn&#8217;t have a working screen or CD drive.</p>
<p>I decided to install Xubuntu Hardy Heron onto the problematic laptop with a thumb drive. My personal laptop is running Intrepid Ibex and its got that &#8220;Create a USB Startup disk&#8221; option. Problem solved? Wrong!</p>
<p>Did you know that some thumb drives just cannot be booted from? Well, I have one of those thumb drives&#8230;</p>
<p>I had two options at that point: I could buy another thumb drive or I could install a PXE server onto my tower and install Xubuntu over the net.</p>
<p>I took the free option&#8230;</p>
<h2>What is a PXE Server?</h2>
<p>PXE stands for Preboot eXecution Environment. That means you can create a server that boots anything over the network. I would be able to essentially boot the install disc from over the network!</p>
<p>Since open source software is awesome, I knew I could google &#8216;hardy heron pxe server&#8217; and find the tutorials I needed! That proved to be true. There were lots of tutorials, but none of them worked for me. I combined several and got it nearly working. I would get timeout errors, but I knew the server was up and running. I later found an obscure article with a comment that solved the problem!</p>
<p>I&#8217;m writing this so you won&#8217;t have to go through what I did just to install an OS! Here we go!</p>
<h2>Stuff you need</h2>
<ul>
<li>a server pc (this will be your PXE)</li>
<li>a client pc (this is what you&#8217;re installing on)</li>
<li>a LAN</li>
</ul>
<h2>Install some stuff</h2>
<pre class="brush: bash">
sudo apt-get install dhcp3-server tftpd-hpa tftp-hpa inetutils-inetd </pre>
<h2>Download some stuff</h2>
<h2><span style="font-size: small;"><span style="font-weight: normal;">You have to download netboot.tar.gz</span></span></h2>
<pre class="brush: bash">
wget http://archive.ubuntu.com/ubuntu/dists/hardy/main/installer-X/current/images/netboot/netboot.tar.gz
</pre>
<p>Make sure to change the X in installer-X to your appropriate chip architecture which should be either amd64 or i386.</p>
<p>Extraction and folder prep</p>
<pre class="brush: bash">
sudo tar xvzf netboot.tar.gz -C /var/lib/tftpboot/
sudo chown -R nobody:nogroup /var/lib/tftpboot
sudo chmod -R 777 /var/lib/tftpboot
</pre>
<h2>Configure your DHCP server</h2>
<h2><span style="font-size: small;"><span style="font-weight: normal;">You have to edit dhcpd.conf</span></span></h2>
<pre class="brush: bash">
sudo vim /etc/dhcp3/dhcpd.conf
</pre>
<p>Change the contents of the file to be:</p>
<pre class="brush: bash">
ddns-update-style none;
default-lease-time 8600;
max-lease-time 74000;
subnet 192.168.1.0 netmask 255.255.255.0{
  range 192.168.1.0 192.168.1.100;
  filename "pxelinux.0"
}
</pre>
<p>This part is a little weird. I&#8217;m running this over a LAN so I just used 192.168. Run</p>
<pre class="brush: bash">
sudo ifconfig
</pre>
<p>to find out your IP address. You may need to change this file to reflect your network&#8217;s setup.</p>
<h2>Configure TFTP server</h2>
<p>Edit tftpd-hpa</p>
<pre class="brush: bash">
sudo vim /etc/default/tftpd-hpa
</pre>
<p>The contents of the file should be:</p>
<pre class="brush: bash">
#Defaults for tftpd-hpa

RUN_DAEMON="yes"

OPTIONS="-l -s /var/lib/tftpboot"
</pre>
<h2>Configure inetutils-inetd</h2>
<p>Edit inetd.conf</p>
<pre class="brush: bash">
sudo vim /etc/inetd.conf
</pre>
<p>The contents of the file should be:</p>
<pre class="brush: bash">
tftp    dgram   udp4     wait root  /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /var/lib/tftpboot
</pre>
<p>The third parameter must be udp4! This is what was messing up my setup before. Apparently, Ubuntu versions starting with Hardy need udp4. Older versions can get away with udp.</p>
<h2>Restart DHCP server and TFTP server</h2>
<pre class="brush: bash">
sudo /etc/init.d/dhcp3-server restart; sudo /etc/init.d/inetutils-inetd restart
</pre>
<p>If your servers didn&#8217;t fail to start, you can move on to the next step.<br />
Check the syslog to help you pinpoint any problems.</p>
<pre class="brush: bash">
tail /var/log/syslog
</pre>
<h2>Installation time</h2>
<p>Make sure your server and client are connected to the LAN. Boot up your client and change the BIOS settings. You should put PXE, Broadcom, or whatever network sounding think to the top.</p>
<p>If everything is working, it should be up like an install disc. Be sure to change the BIOS settings on the client after install.</p>
<h3>Still having issues?</h3>
<ul>
<li>Is port 69 blocked?</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://rafadamar.com/2009/09/pxe-xubuntu-hardy-heron-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

