<?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>MentalRise &#187; Programming</title>
	<atom:link href="http://mentalrise.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://mentalrise.com</link>
	<description>Observations of Business, Adventure, Entrepreneurism and Entropy.</description>
	<lastBuildDate>Mon, 05 Dec 2011 06:32:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Facebook Tip: Move multiple pictures to another album at once</title>
		<link>http://mentalrise.com/2010/06/facebook-tip-move-multiple-pictures-to-another-album-at-once/</link>
		<comments>http://mentalrise.com/2010/06/facebook-tip-move-multiple-pictures-to-another-album-at-once/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 01:34:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://mentalrise.com/?p=66</guid>
		<description><![CDATA[Reorganizing pictures in Facebook is a serious pain.

I was able to whip up a little bit of javascript to help. Here's how to use it:]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re like me, you are probably accumulating a *lot* of pictures in Facebook.</p>
<p>Reorganizing pictures is a serious pain &#8212; you have to click a dropdown menu and select the album you want to move a picture to <strong>for each picture</strong>. There&#8217;s no &#8220;Select All&#8221; option.</p>
<p>I was able to whip up a little bit of javascript to help. Here&#8217;s how to use it:</p>
<ol>
<li>Open up the &#8216;source&#8217; photo album and click &#8216;Edit Photos&#8217;<br />
<img class="alignnone size-full wp-image-67" title="fb1" src="http://mentalrise.com/wp-content/uploads/2010/06/fb1.jpg" alt="" width="500" height="190" /></li>
<li>Underneath the individual photos, you&#8217;ll see the &#8216;Move to:&#8217; dropdown menu. Clicking this menu brings up a list of all your albums.</li>
<li>Imagine that they are numbered, like in the image below. The first album on the list is 1, etc etc.<br />
Determine the number of the album that you want to move your pictures to.</p>
<p><img class="size-full wp-image-68" title="Drop down menu - Album List" src="http://mentalrise.com/wp-content/uploads/2010/06/fb2.jpg" alt="Drop down menu - Album List" width="350" height="253" /></li>
<li>Copy the following code, but be sure to change the number &#8217;1&#8242; in  &#8217;albumNum = 1;&#8217; to the correct number.<br />
<textarea cols="60" rows="4">javascript:albumNum = 1;selects = document.getElementsByTagName(&#8216;select&#8217;);for(i in selects){ selects[i].selectedIndex = albumNum;};return False;</textarea></li>
<li>Paste this code into the url bar while on the &#8216;Edit Album/Edit Photos&#8217; page<img class="size-full wp-image-69" title="Paste into the address bar of your browser" src="http://mentalrise.com/wp-content/uploads/2010/06/fb3.jpg" alt="Paste into the address bar of your browser" width="500" height="101" /></li>
<li>After you paste, press enter and all the &#8216;Move to&#8217; dropdown menus will change to the album you chose. Scroll to the bottom of the page and choose &#8216;Save Changes&#8217;. All set!</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://mentalrise.com/2010/06/facebook-tip-move-multiple-pictures-to-another-album-at-once/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Top Ajax Techniques: Bring these features to your site easily</title>
		<link>http://mentalrise.com/2008/11/top-ajax-techniques-bring-these-features-to-your-site-easily/</link>
		<comments>http://mentalrise.com/2008/11/top-ajax-techniques-bring-these-features-to-your-site-easily/#comments</comments>
		<pubDate>Tue, 04 Nov 2008 07:20:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[web 2.0]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://MentalRise.com/?p=13</guid>
		<description><![CDATA[Web applications have made huge leaps and bounds in improving user experience thanks to a lot of recently developed Ajax technology. When you combine some neat functionality courtesy of PHP with the cleverness of javascript you can produce some pretty cool results. In an effort to help you take it up a notch, we’d like [...]]]></description>
			<content:encoded><![CDATA[<p>Web applications have made huge leaps and bounds in improving user experience thanks to a lot of recently developed Ajax technology. When you combine some neat functionality courtesy of PHP with the cleverness of javascript you can produce some pretty cool results. In an effort to help you take it up a notch, we’d like to share some methods for helping your site anticipate a user’s next move.</p>
<p><a href="http://www.noupe.com/javascript/most-wanted-ajax-techniques-50-ajax-examples-and-tutorials.html">Full Article from noupe.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mentalrise.com/2008/11/top-ajax-techniques-bring-these-features-to-your-site-easily/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Howto: LDAP Aliases on Courier</title>
		<link>http://mentalrise.com/2008/07/howto-ldap-aliases-on-courier/</link>
		<comments>http://mentalrise.com/2008/07/howto-ldap-aliases-on-courier/#comments</comments>
		<pubDate>Tue, 08 Jul 2008 02:11:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[alias]]></category>
		<category><![CDATA[courier]]></category>
		<category><![CDATA[courierldapaliasd]]></category>
		<category><![CDATA[forwarder]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[ldapaliasrc]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[maildrop]]></category>

		<guid isPermaLink="false">http://MentalRise.com/?p=10</guid>
		<description><![CDATA[We decided to setup a mail server based entirely around the courier suite of mail applications on debian. This should end the incessant problems we are having with our poorly designed Qmail based mail server, hopefully. Step 1 was to get user authentication working (via LDAP) against our local Domain Controller/Active Directory box &#8211; so [...]]]></description>
			<content:encoded><![CDATA[<p>We decided to setup a mail server based entirely around the courier suite of mail applications on debian. This should end the incessant problems we are having with our poorly designed Qmail based mail server, hopefully.</p>
<p>Step 1 was to get user authentication working (via LDAP) against our local Domain Controller/Active Directory box &#8211; so far, so good (I&#8217;ll be sure to describe that struggle in another post).</p>
<p>Step 2 was getting the Aliases setup, which was a bit more involved.</p>
<p>We installed a local copy of openldap and courier&#8217;s ldap plugins using apt-get:</p>
<pre>sudo apt-get install slapd courier-ldap</pre>
<p>Next, to delete all the example data that came with openldap (NOTE: This will remote the contents of your ldap data folder! If you have anything important in there, back it up first!)</p>
<pre>cd /var/lib/ldap/ &amp;&amp; sudo rm -rf *.* alock</pre>
<p>We&#8217;ll go ahead and import the base ldap structure. Referencing some old ldap data, we came up with this dump for the domain &#8216;example.local&#8217;, and stored it in /root/base.ldif :</p>
<pre>dn: dc=example,dc=local
objectClass: top
objectClass: dcObject
objectClass: organization
o: example
dc: example
structuralObjectClass: organization

dn: ou=aliases,dc=example,dc=local
objectClass: top
objectClass: organizationalUnit
ou: aliases
structuralObjectClass: organizationalUnit</pre>
<p>Great! Let&#8217;s load it in the into ldap!</p>
<p><span id="more-10"></span></p>
<pre>sudo slapadd -vv -f /root/base.ldif</pre>
<p>Now, the data is loaded inside of ldap, but all the physical data files are owned by root. Assuming ldap is running as the user &#8216;openldap&#8217; on your system, let&#8217;s chown them:</p>
<pre>sudo chown -R openldap: /var/lib/ldap/</pre>
<p>Great. Let&#8217;s generate an admin password</p>
<pre>slappasswd
New password: &lt;hidden&gt;
Re-enter new password: &lt;hidden&gt;
{SSHA}d5+W6qGRDcMbsnIAvYasklajdklaO7N3Kby</pre>
<p>Copy that last line, and let&#8217;s start editing your openLDAP configuration file, slapd.conf</p>
<pre>sudo vi /etc/ldap/slapd.conf</pre>
<p>Find the following items, and change them as needed:</p>
<pre>suffix      &quot;dc=example,dc=local&quot;
rootdn      &quot;cn=admin,dc=example,dc=local&quot;
rootpw      {SSHA}d5+W6qGRDcMbsnIAvYasklajdklaO7N3Kby
index           mail,objectClass eq</pre>
<p>(Note: your &#8216;rootpw&#8217; should be different from above. Also, look through the rest of the file for any mention of &quot;dc=nodomain&quot; and replace it with &quot;dc=example,dc=local&quot;, or whatever your LDAP base is.)</p>
<p>Awesome!</p>
<p>Now, by default Courier bases its mail aliasing on a few different attributes, some of which are nonstandard or undefined. To fix this, we&#8217;ll create a quick schema file of our own. On Debian the schema files are stored in /etc/ldap/schema/, so we&#8217;ll create a new one named &#8216;local.schema&#8217;:</p>
<pre>sudo vi /etc/ldap/schema/local.schema

# Copied and pasted from the 'mail' attributetype,
# with a different OID, Name, and Desc
attributetype ( 0.9.2342.19200300.100.1.3.1
        NAME ( 'maildrop' )
        DESC 'Courier alias, will be used to deliver mail to'
    EQUALITY caseIgnoreIA5Match
    SUBSTR caseIgnoreIA5SubstringsMatch
    SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )

# Subclass of inetOrgPerson, with a different
# OID, Name, Desc, and MUST
objectclass     ( 2.16.840.1.113730.3.2.2.1
    NAME 'courierAliasPerson'
        DESC 'Courier mail alias person'
    SUP organizationalPerson
    STRUCTURAL
        MUST (  mail $ maildrop )
        MAY (
                audio $ businessCategory $ carLicense $ departmentNumber $
                displayName $ employeeNumber $ employeeType $ givenName $
                homePhone $ homePostalAddress $ initials $ jpegPhoto $
                labeledURI $  manager $ mobile $ o $ pager $
                photo $ roomNumber $ secretary $ uid $ userCertificate $
                x500uniqueIdentifier $ preferredLanguage $
                userSMIMECertificate $ userPKCS12 )
        )</pre>
<p>Save and exit your editor, then add this new schema file near the top of your slapd.conf, underneath the existing schema declarations:</p>
<pre># Schema and objectClass definitions
include         /etc/ldap/schema/core.schema
include         /etc/ldap/schema/cosine.schema
include         /etc/ldap/schema/nis.schema
include         /etc/ldap/schema/inetorgperson.schema
# Our new courier schemas
include         /etc/ldap/schema/local.schema</pre>
<p>Let&#8217;s go ahead and import 1 alias for testing. If 1 works, they all should work!</p>
<pre>cat &lt;&lt;__EOD__ &gt;/tmp/testalias.ldif
objectClass: top
objectClass: courierAliasPerson
cn: bob
sn: bob
mail: bob@example.local
maildrop: my-email-address@gmail.com
__EOD__

sudo slapadd -vv -f /tmp/testalias.ldif
sudo chown -R openldap: /var/lib/ldap/</pre>
<p>At this point we are done with the local ldap stuff for now. Let&#8217;s mess with courier&#8217;s ldap alias config file, stored at /etc/courier/ldapaliasrc .  This is what mine ends up looking like, minus all the comments:</p>
<pre>LDAP_ALIAS              1
LDAP_SERVER             localhost
LDAP_PORT               389
LDAP_NUMPROCS           5
LDAP_BASEDN             ou=aliases, dc=example, dc=local
LDAP_BINDDN             cn=admin, dc=example, dc=local
LDAP_BINDPW             my_awesome_password
LDAP_TIMEOUT            5
LDAP_MAIL               mail
LDAP_MAILDROP           maildrop</pre>
<p>Replace the LDAP_BASEDN, LDAP_BINDDN, and LDAP_BINDPW appropriately. Note, the LDAP_BINDPW is your password in plain text, so make sure this file isn&#8217;t world readable!</p>
<p>If you were to start all of your services (slapd, courier-mta, courier-ldap, etc) right now, would it work? NO! Instead, you would get this mysterious error message:</p>
<pre>Jul  8 00:56:09 localhost courieresmtpd: error,relay=::ffff:127.0.0.1,
ident=user,from=&lt;testuser@gmail.com&gt;,
to=&lt;bob@example.local&gt;: 400 Service temporarily unavailable.</pre>
<p>No details at all. This error message shows up because the &#8216;courierldapaliasd&#8217; daemon is not running. Let&#8217;s fix that, and make sure the service starts up properly in the future.</p>
<pre>ln -s /usr/sbin/courierldapaliasd /etc/init.d/
update-rc.d courierldapaliasd defaults
/etc/init.d/courierldapaliasd start</pre>
<p>One last thing &#8211; if you have been following along, you might notice I didn&#8217;t start the other services. Let&#8217;s do that too.</p>
<pre>/etc/init.d/slapd start
/etc/init.d/courier-mta start
/etc/init.d/courier-ldap start
/etc/init.d/courier-imap start
/etc/init.d/courier-authdaemon start</pre>
<p>There we have it. You should be able to send a message to our test user &#8216;bob@example.local&#8217;, and it will forward to the email address you specified. From this point forward you can populate your ldap database with similar entries.</p>
<p>Keep in mind that each courierAliasPerson entry can have a potentially unlimited number of &#8216;maildrop&#8217; attributes.</p>
<p>Wanna test it? (everything I typed in appears in bold)</p>
<pre>examplemail01:~# <strong>telnet localhost 25</strong>

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 [examplemail01] [UBE Prohibited] Go ahead...
<strong>HELO fakehelo</strong>

250 examplemail01 Ok.
<strong>MAIL FROM: &lt;fakename@gmail.com&gt;</strong>

250 Ok.
<strong>RCPT TO: &lt;bob@example.local&gt;</strong>

250 Ok.
<strong>DATA</strong>

354 Ok.
<strong>Hi!

.</strong>

250 Ok. 4872CE5A.00005C7B</pre>
<p>My logs show the sweet alias success that I crave.</p>
<pre>Jul  7 19:18:08 localhost courierlocal: id=00003F83.4872CE5A.00005C7B,
from=&lt;fakename@gmail.com&gt;,addr=&lt;my-email-address@gmail.com&gt;,
size=187,success: Message delivered.</pre>
<p>Hope this saves some time for the rest of you out there <img src='http://mentalrise.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://mentalrise.com/2008/07/howto-ldap-aliases-on-courier/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Wondering About Widgets? Look no further&#8230;</title>
		<link>http://mentalrise.com/2008/05/wondering-about-widgets-look-no-further/</link>
		<comments>http://mentalrise.com/2008/05/wondering-about-widgets-look-no-further/#comments</comments>
		<pubDate>Sat, 17 May 2008 17:36:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[apps]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[myspace]]></category>
		<category><![CDATA[web 2.0]]></category>
		<category><![CDATA[widgetbox]]></category>
		<category><![CDATA[widgets]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://MentalRise.com/?p=8</guid>
		<description><![CDATA[Facebook, Blogger, MySpace, TypePad &#8211; how many times have we heard the importance of leveraging the viral potential of Apps and Widgets to attract an audience? Many, many times, to be sure. There is good reason though. Widgets and mini-apps allow companies to distribute portable, stylish technology packages to whomever wants to use them, getting [...]]]></description>
			<content:encoded><![CDATA[<p>Facebook, Blogger, MySpace, TypePad &#8211; how many times have we heard the importance of leveraging the viral potential of Apps and Widgets to attract an audience? Many, many times, to be sure.</p>
<p>There is good reason though. Widgets and mini-apps allow companies to distribute portable, stylish technology packages to whomever wants to use them, getting their name out there, increasing their website traffic statistics, and earning the trust of users from demographics and niches they probably wouldn&#8217;t reach on their own.</p>
<p>I&#8217;m looking into developing a few small widgets, just to get my feet wet, and discovered <a href="http://www.widgetbox.com/">Widgetbox</a> . This site is the first step for anyone interested in seeing the potential of widgets, for creative inspiration, or to download and add high quality widgets to their own blogs and social networking profiles</p>
<p><a href="http://www.widgetbox.com/">http://www.widgetbox.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mentalrise.com/2008/05/wondering-about-widgets-look-no-further/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Network Loops == More Work For Me</title>
		<link>http://mentalrise.com/2008/05/network-loops-more-work-for-me/</link>
		<comments>http://mentalrise.com/2008/05/network-loops-more-work-for-me/#comments</comments>
		<pubDate>Sat, 10 May 2008 02:18:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[foundry]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[router]]></category>
		<category><![CDATA[routing]]></category>

		<guid isPermaLink="false">http://MentalRise.com/?p=3</guid>
		<description><![CDATA[When I think of an enjoyable, relaxing Friday night, I do not envision running around my company&#8217;s data center, tracing cables, logging into switches and routers via console trying to track down a network loop. So, it&#8217;s 10pm now, and the problem has been resolved. Only 3 hours, too! Network loops are particularly annoying with [...]]]></description>
			<content:encoded><![CDATA[<p>When I think of an enjoyable, relaxing Friday night, I do not envision running around my company&#8217;s data center, tracing cables, logging into switches and routers via console trying to track down a network loop.</p>
<p>So, it&#8217;s 10pm now, and the problem has been resolved. Only 3 hours, too!</p>
<p>Network loops are particularly annoying with less-than-ideal network configurations, or networks that are using overloaded and/or aging products. We use a couple of <strong>Foundry BigIrons</strong> as our core switches, and no matter how many Foundry technicians we throw at them, they always seem to have spanning tree problems.</p>
<p>I&#8217;m sure many of you would have words of wisdom for me, but let&#8217;s just say that I&#8217;ll be a happier person when we move on to a more stable, modern, and solid network configuration. (Note: I&#8217;m not slighting Foundry, just our particular *use* of this Foundry equipment.</p>
]]></content:encoded>
			<wfw:commentRss>http://mentalrise.com/2008/05/network-loops-more-work-for-me/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

