Sivel.net  Throwing Hot Coals


Right Brain v Left Brain

I normally try to not post news that I got off of a news site but in this event I just had to.

Article from:http://www.news.com.au/heraldsun/story/0,21985,22556281-661,00.html

**THE Right Brain vs Left Brain test … do you see the dancer turning clockwise or anti-clockwise?
**

If clockwise, then you use more of the right side of the brain and vice versa.

Most of us would see the dancer turning anti-clockwise though you can try to focus and change the direction; see if you can do it.

LEFT BRAIN FUNCTIONS
uses logic
detail oriented
facts rule
words and language
present and past
math and science
can comprehend
knowing
acknowledges
order/pattern perception
knows object name
reality based
forms strategies
practical
safe

RIGHT BRAIN FUNCTIONS
uses feeling
“big picture” oriented
imagination rules
symbols and images
present and future
philosophy & religion
can “get it” (i.e. meaning)
believes
appreciates
spatial perception
knows object function
fantasy based
presents possibilities
impetuous
risk taking


This just absolutely freaks me out. I see the dancer spinning clockwise and anti-clockwise. It switches while I am watching. I apparently use both the right and left side of my brain equally.

CoolStuff News Science

No Widget Category Cloud WordPress Plugin

I am releasing version 0.2 of the No Widget Category Cloud WordPress plugin that I have written for use on my site.

Creates a function that can be placed in a wordpress template for a category cloud that exists without the requirement of widgets or a widget ready theme.

I created this plugin after I started using a single column theme that is not widget ready. I found that there were multiple plugin widgets available, but no plugin that would allow me to just place a php function into my theme to display a category cloud.

Some ideas for oter uses of this plugin:

  1. Install WP-Sticky and Exec-PHP. Create a Sticky post which will stay at
    the top of your page and type the php code for this plugin in the post. Now
    you have a Category Cloud that stays at the top of your page.

Screenshots

Installation

  1. Upload the `no-widget-category-cloud` folder to the `/wp-content/plugins/` directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress

NOTE: See “Other Notes” for Upgrade and Usage Instructions as well as other pertinent topics.

Requirements

  1. WordPress 2.x
  2. Web server that supports PHP

Upgrade

  1. Deactivate the plugin through the ‘Plugins’ menu in WordPress
  2. Delete the previous `no-widget-category-cloud` folder from the `/wp-content/plugins/` directory
  3. Upload the new `no-widget-category-cloud` folder to the `/wp-content/plugins/` directory
  4. Activate the plugin through the ‘Plugins’ menu in WordPress

Usage

<?php nw_catcloud(small_size,big_size,size_unit,align,orderby,order,min_posts,hide_empty,title); ?>

small_size = font size, integer (default 75)
big_size = font size, integer (default 200)
size_unit = %, px, pt (default %)
align = left, right, center, justify (default left)
orderby = count, name (default name)
order = asc, desc (default asc)
min_posts = minimum number of posts, integer (default 1)
hide_empty = 0,1 (default 1, 1=yes,0=no)
title = string (This can contain HTML to format the title)

  1. Open the theme files, in your favorite editor, that you wish to add the category cloud to (index.php, single.php, page.php, etc…).
  2. Add a line that looks like above. You can also use the defaults by not specifiying anything between the parentheses. See example 2 below.
  3. Enjoy.
  4. As I mentioned in the description you can also use this plugin with Exec-PHP and it would make a nice combo with WP-Sticky.

Examples:

<?php nw_catcloud(75,200,'%','left','name','asc',1,1,'<br /> <h2 class="posttitle">Categories</h2> <p>'); ?>

<?php nw_catcloud(); ?>

Change Log

0.2

  • Initial Public Release

To Do

  1. I am open to suggestions.
  2. I am sure I will think of something.

Credit

I’ve got to give credit where credit is due. And that credit goes to Lee Kelleher and his Category Cloud Widget. I used a lot of his code in this plugin modifying it where needed to make it work the way I wanted.

Download
No Widget Category Cloud version 0.2

Plugins WordPress

WordPress Minimalist Theme &#8211; A New Look &#8211; Minimalist

Please note that the current theme I am using is no longer the one mentioned in this post.

For anyone who has been to this site before you have by no doubt noticed that the look and feel of the site has changed dramatically. After benchmarking page load times on my site and seeing average load times of 11.6 seconds I decided that the way to go was a minimalist look. This new theme has been modified…and yes I will distribute the modified version.

It took me a while to find this theme, Aielman’s SEO Theme, by Uberdose and it was just what this site needed. While it was almost perfect, I needed to have links for my pages which didn’t come with this theme and I needed to make the blogroll look like the page links I had created. There were also some strange formatting issues, no doubt from some of my other modifications, that have been resolved as well.

Average page load times now are around 1.5 seconds.

Download

For the Categories Cloud you see on my Home page see my No Widget Category Cloud WordPress Plugin.

Change Log
0.2

  • Initial Public Release

0.2.1

  • Added additional CSS for Internet Explorer to fix formatting issues

0.2.2

  • Removed show_description from wp_list_bookmarks function in index.php
Themes WordPress

Seeed

Rewind to July 22nd, 2007. Yes I can still do that.

My wife and I missed our flight from Athens, Greece to Munich, Germany. Luckily enough we were put on a later flight but would have to spend the night in Munich. The following morning while eating breakfast and watching MTV I happened to see two videos for the band Seeed. From that day on I have loved this band and their music videos. I have to say that their music videos are some of the best I have ever seen. One in particular has remained my favorite music video of all time…Ding.

Forward to October 1st, 2007. Here we go again…

I was playing around on YouTube and found the video for Ding. See below:

CoolStuff Music

Polaroid on the Fly WordPress Plugin

Update:As of February 2, 2009 I will no longer be updating the Polaroid on the Fly WordPress plugin; this plugin is now end of life.

I am releasing version 0.7 of the Polaroid on the Fly plugin.

Creates polaroids of images on the fly for thumbnails in posts. Support for lightbox included. Built on modified Polaroid-o-nizer v0.7.2 sources.

I wanted to mimic the Polaroid look that you can achieve with Google Picasa to add thumbnails to my posts. I found a plugin titled WP-Polaroidonizer that did what I wanted to some extent but it didn’t have the right feel to it.

The other problem I have with Polaroid-o-nizer and WP-Polaroidonizer is the lack of security. When I mention lack of security there is by default no way to restrict external sites and users from generating Polaroid pictures using your installation of Polaroid-o-nizer.

The goal of this plugin was to use rel= style html img tags to transform a simple URL into a Lightbox URL in which there is a thumbnail image in your post which is linked to an image that can be loaded using Lightbox or any of the Lightbox clones/alternatives.

Screenshots

Requirements

  1. WordPress 2.0
  2. PHP GD Module
  3. Lightbox - Not really a requirement but a recommendation if you want to have a nice ajax/javascript image overlay on your page

Installation

  1. Upload the `polaroid-on-the-fly` folder to the `/wp-content/plugins/` directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress

Upgrade

  1. Deactivate the plugin through the ‘Plugins’ menu in WordPress
  2. Delete the previous `polaroid-on-the-fly` folder from the `/wp-content/plugins/` directory
  3. Upload the new `polaroid-on-the-fly` folder to the `/wp-content/plugins/` directory
  4. Activate the plugin through the ‘Plugins’ menu in WordPress

Usage

  1. Create an image link in your post in the following format:
    <img src="http://domain.tld/directory/to/image.jpg" rel="polaroid" alt="Picture[album]" />

  2. Be sure to include rel=“polaroid” as this activates the plugin.

  3. If alt=“Picture[album]” is included the portion listed here as Picture will be displayed as the image title in Lightbox and the portion listed as [album] will group multiple pictures into an album called album. The alt tag is not required and if used the [album] portion is not required. Read the Lightbox usage for more details on Titles and albums.

  4. Be sure to place each html img tag on a separate line.

  5. This plugin supports the following image formats: jpg, png, gif

NOTE: Do not use the visual editor for doing the above use the code editor.

FAQ

Q: What Do The Error Messages Mean:

A:
Source image resolution below min (200x200px)
The image referenced in the image tag has a resolution less than 200x200 pixels.

Source image resolution above max (2000x2000px)
The image referenced in the image tag has a resolution greater than 2000x2000 pixels.

Source URL Incorrect of does not Exist
The URL of the image referenced in the image tag does not exist.

Background color is invalid use RGB only
The background color specified on the options page is not a valid 24 bit RGB color. When written, RGB values in 24 bits per pixel (bpp), also known as Truecolor, are commonly specified using three integers between 0 and 255, each representing red, green and blue intensities, in that order. For example:

white is 255,255,255
black is 0,0,0
red is 255,0,0
green is 0,255,0
blue is 0,0,255

Source image unknown file type (jpg,gif,png only)
You should never see this message. The regex used to find the img tag with rel=“polaroid” will only select img tags including jpg,gif and png. I figured hey why not create a useless image it may come in handy some day.

PHP GD Module Not Found. Polaroid on the Fly will not work. See http://us.php.net/gd for installation information.
You need to have the PHP GD Module Installed. This plugin requires the GD module to make the polaroid image. This plugin will not function without this module.

PHP GD Module Found. However, it does not include support for GIF. You will not be able to use a GIF for the source image. See http://us.php.net/gd for more information.
You have the PHP GD Module installed but the GD version does not support GIF images. This plugin will still work but you will not be able to use a GIF for the source image.

Change Log

0.7 (2008-07-31):

  • Updated for compatibility with WordPress 2.6 (wp-content and wp-config.php changes).
  • Changes to gen-polaroid.php to accommodate Ubuntu PHP GD Packages.
  • Updated path to the font ttf file in gen-polaroid.php.
  • Output image now in png format instead of jpg.

0.6 (2008-01-23):

  • Added ability to opt in to using Lightbox.
  • Added option to select how the image will open. (ie. new window, self)
  • Added option to specify the hright and width of the thumbnail
  • Added option to reset all options to their defaults
  • Updated descriptions on the Options page.

0.5 (2007-10-24):

  • Added error reporting. Errors will be displayed as a replacement to the image in the post.
  • Added images for use when displaying the above errors.
  • Added error reporting for GD Module. Errors will be displayed on the options page.
  • Added functionality to opt in to using encoded URLs.
  • Fixed case sensitvity in regex used to match the img tag (now case insensitive).
  • Removed large amounts of uneeded code in the Polaroid-o-nizer script.
  • Converted all files to UNIX format.

0.4 (2007-10-03):

  • Added options page (Options->Polaroid on the Fly)
  • Added functionality to opt in to security restrictions
  • Added functionality to not require the use of tinyurl.com and fopen
  • Added functionality to display the photo caption using the alt text
  • Added support to change the background color from the options page
  • Removed requirement for .htaccess
  • Renamed the Polaroid-o-nizer files
  • Changed references to Polaroid-o-nizer files

0.3 (2007-09-18):

  • Initial Public Release

To Do

  1. Add features for x and y offset
  2. Add features for rotation angle
  3. Add additional error reporting for the offset and angle
  4. Add functionality to options page to generate a URL for placement elsewhere on the site.
  5. Add functionality to cache the polaroid images.

Download
Polaroid on the Fly version 0.7
Archived Versions

Plugins WordPress

Time Machine

Rewind to August 2nd, 2007. I can do that you know.

My first son, Logan, was born at 1:34pm. He weighed 7lbs 5oz and was 18in long. Actually I think he was longer but it took him several weeks to learn that he could stretch his legs out.

For those of you who are interested more pictures can be found here and here.

General

A New Direction

For years now I have tried to maintain a web site and entice users to it. I have done this to some extent but I believe what bothers me the most is the fact that until now I have strictly limited my site to technical postings and howtos.

I believe what I really want to do with my site is post whatever the hell I want as well as the technical mumbo jumbo and make it more friendly to even those who don’t care about patching a Linux kernel.

So if some of you have noticed small changes in the site recently it is due to me making it more generalized in nature.

If some of you have noticed poor uptime recently that is no fault of mine. My hosting provider assures me that everything should be back to normal now but I am still tracking roughly at 95% uptime for the latter part of August. We will have to wait and see how September fairs.

General

What is my IP Address

It has been quite some time since I have posted anything…Not due to the fact that I don’t have anything to post but rather because I am busy preparing for my soon to come son and have been quite busy with work. With that being said I have placed a “what is my ip” page on my site. It’s nothing special, but that is what makes it special. In my case I hate using the other “what is my ip” sites because they have so much extra crap on the page that I don’t care about like ads (Odd that I hate ads and I work for the largest internet advertising company).

With the being said…the url: http://sivel.net/ip

Enjoy!

By the way…more postings to come soon!

Technology

Enabling NTLM Authentication (Single Sign-On) in Firefox

This HowTo will describe how to enable NTLM authentication (Single Sign-On) in Firefox.

How many of you have noticed that when you are using Internet Explorer and you browse to your companies intranet page that it will automatically authenticate you but when you use Firefox you will be prompted with a login box?

I recently, in searching for solutions to allow NTLM authentication with Apache, stumbled across how to set a preference in Firefox that will pass the NTLM authentication information to a web server. The preference is network.automatic-ntlm-auth.trusted-uris.

So how do you do it?

1) Open Firefox and type “about:config” in the address bar. (without the quotes of course)
2) In the ‘Filter’ field type the following “network.automatic-ntlm-auth.trusted-uris”
3) Double click the name of the preference that we just searched for
4) Enter the URLs of the sites you wish to pass NTLM auth info to in the form of:

http://intranet.company.com,http://email.company.lan

5) Notice that you can use a comma separated list in this field.
6) Updated: I have created VBScript that can be used to insert this information into a users prefs.js file by using group policy or standalone if for some reason you want to use it for that.

The script is available to be downloaded here.

After downloading the script you will want to extract it from the ZIP archive and then modify the line starting with strSiteList.

NOTE: This script will not perform its function if the user has Firefox open at the time the script is executed. Running the script through group policy will work without problem unless for some reason your group policy launches Firefox before the execution of this script.

You can read through the rest of the script for additional information. If you have questions, comments or concerns please let me know.

HowTo

Single Sign-On with Apache and Active Directory &#8211; Part 1

Part 1 | Part 2

This HowTo will describe how to setup single sign-on authentication with Apache and Microsoft Active Directory. Most of you are probably aware that there is no default/built-in support for automatically authenticating to an Apache web server using the NTLM header information passed from the web browser (in most cases Microsoft Internet Explorer) to the Web Server. Microsoft IIS of course supports this out of the box but who wants to use IIS? There are as I have found 3 major solutions for achieving this and I will outline which I picked and why.

First I’ll start by explaining which solution I selected and why. There are 3 major solutions for this which are mod_ntlm, mod_auth_kerb and Apache2:AuthenNTLM. I have chosen Apache2:AuthenNTLM. Now as for the why…I bypassed mod_auth_kerb instantly after reading that it required a working winbind setup. Keep in mind that I am looking for an easy quick setup, and configuring winbind first does not fall into that realm of a quick and easy setup. Next I tried mod_ntlm which seemed to be very easy to setup and worked well. But there was one catch…If the browser did not send the NTLM information or correct NTLM information1 the user had to login with the username in the form of DOMAINusername. In my experience with applications already in place they did not require this form of DOMAINusername. This could be resolved if you could specify the default domain in mod_ntlm which you cannot. Reading the documentation for Apache2:AuthenNTLM you could specify the default domain as well as many other options that are not available in mod_ntlm. Configuration proved to be a little tricky, but if it weren’t I wouldn’t be writing this HowTo. Now as you may have noticed from the naming syntax of Apache2:AuthenNTLM that it is indeed a perl module. Now as we are using Apache2:AuthenNTLM it will require mod_perl2 which is not included with CentOS4 or RHEL4.

Now for the HowTo:

1) Start by installing Apache and mod_perl by issuing the following commands:

shell> yum install httpd
shell> wget http://sivel.net/repo/i386/mod_perl-2.0.3-1.el4.sn.i386.rpm
shell> rpm -Uvh mod_perl-2.0.3-1.el4.sn.i386.rpm

2) Next we need to install the Apache2:AuthenNTLM module

shell> wget http://sivel.net/repo/i386/perl-Apache2-AuthenNTLM-0.02-1.el4.sn.i386.rpm
shell> rpm -Uvh perl-Apache2-AuthenNTLM-0.02-1.el4.sn.i386.rpm

3) Now we need to configure Apache to use Apache2:AuthenNTLM

shell> cd /etc/httpd/conf.d
shell> touch ntlm.conf
shell> vi ntlm.conf

  • Add the following information:

    # Change this to the directory you wish to protect. Can be / PerlAuthenHandler Apache2::AuthenNTLM AuthType ntlm,basic AuthName Basic require valid-user

    domain pdc bdc

    PerlAddVar ntdomain “DOMAIN dc1 dc2” # Change DOMAIN to the netbios name of your domain. Change dc1 and dc2 to the hostnames of the domain controllers for your domain. dc2 is not required if your setup does not have a dc2. PerlSetVar defaultdomain DOMAIN # Change DOMAIN to the netbios name of your domain PerlSetVar splitdomainprefix 1

shell> vi /etc/httpd/conf/httpd.conf
Find ‘KeepAlive Off’ and change it to ‘KeepAlive On’

4) Now we need to modify /etc/resolv.conf

shell> vi /etc/resolv.conf

  • We need to make sure that it looks like the following:

search domain.lan
nameserver 10.0.0.1
nameserver 10.0.0.2

  • Where domain.lan is your Active Directory domain name and the nameservers are the name servers for your Active Directory (usually the domain controllers)

5) Let’s start Apache

shell> /etc/init.d/httpd start

6) Let’s setup a simple test page that will utilize the server environment variable that AuthenNTLM sets.

shell> cd /path/set/in/step/3
shell> touch index.php
shell> vi index.php

  • Insert the following information:

<br /> <?php<br /> echo "You have logged in as <b>" . $_SERVER['REMOTE_USER'] . "</b>;";<br /> ?><br />

  • If you do not see your username then you don’t have something in step 3 setup correctly. If you get a login prompt check the footnotes below.

Part 2

Footnotes
1. Getting a login prompt can be caused by using Firefox with the default configuration, not being logged on in the domain that you are attempting to authenticate against, or not having the site listed in the Local Intranet security zone in Internet Explorer. Or worst of all you could have mis configured something in step 3. You can turn on debug information by adding ‘PerlSetVar ntlmdebug 2’ to step 3. Debugging will log to /var/log/httpd/error_log.

HowTo Linux