tomhoppe.com

Archive for the ‘CSS’ Category

First foray in PHP

Wednesday, August 20th, 2008

So I’ve been a windows guy personally. Its just always what the companies where I worked used, and what I personally used. The web forum that I run has been using an antiquated ASP forum software for a while though, and it was time to move on. After evaluating some of the options, looks like vBulletin using PHP was the best one.

I have to say that I’m very impressed with my experience so far. PHP is installed and has been running like a champ on our IIS 6.0 server. The vBulletin and mySQL installs both went super smooth and I had the new forum up and running and data transferred in no time. I also made some custom php pages for redirects and the like, as well as a few edits to vBulletin’s pages.

I’m happy with the speed in which I was able to sort of “pick up” php. I was a little worried at first about being able to jump into it, but its like an “easy” ASP with a little bit of asp and javascript syntax all thrown into one. All in all, easy to learn and because of the community support, there is all kinds of mySQL and php info out there on google.

Regular Expression Cheat Sheet

Monday, August 11th, 2008

I just wanted to give myself a reference for a regular expression cheat sheet. This is much easier then forgetting and having to google for what I need. Pretty much all you ever need to know to setup a regexp.

. Matches any single character (many applications exclude newlines, and exactly which characters are considered newlines is flavor, character encoding, and platform specific, but it is safe to assume that the line feed character is included). Within POSIX bracket expressions, the dot character matches a literal dot. For example, a.c matches “abc“, etc., but [a.c] matches only “a“, “.“, or “c“.
[ ] A bracket expression. Matches a single character that is contained within the brackets. For example, [abc] matches “a“, “b“, or “c“. [a-z] specifies a range which matches any lowercase letter from “a” to “z“. These forms can be mixed: [abcx-z] matches “a“, “b“, “c“, “x“, “y“, and “z“, as does [a-cx-z].

The - character is treated as a literal character if it is the last or the first character within the brackets, or if it is escaped with a backslash: [abc-], [-abc], or [a\-bc].

[^ ] Matches a single character that is not contained within the brackets. For example, [^abc] matches any character other than “a“, “b“, or “c“. [^a-z] matches any single character that is not a lowercase letter from “a” to “z“. As above, literal characters and ranges can be mixed.
^ Matches the starting position within the string. In line-based tools, it matches the starting position of any line.
$ Matches the ending position of the string or the position just before a string-ending newline. In line-based tools, it matches the ending position of any line.
\( \) Defines a marked subexpression. The string matched within the parentheses can be recalled later (see the next entry, \n). A marked subexpression is also called a block or capturing group.
\n Matches what the nth marked subexpression matched, where n is a digit from 1 to 9. This construct is theoretically irregular and was not adopted in the POSIX ERE syntax. Some tools allow referencing more than nine capturing groups.
* Matches the preceding element zero or more times. For example, ab*c matches “ac“, “abc“, “abbbc“, etc. [xyz]* matches “”, “x“, “y“, “z“, “zx“, “zyx“, “xyzzy“, and so on. \(ab\)* matches “”, “ab“, “abab“, “ababab“, and so on.
\{m,n\} Matches the preceding element at least m and not more than n times. For example, a\{3,5\} matches only “aaa“, “aaaa“, and “aaaaa“. This is not found in a few, older instances of regular expressions.

Better Firefox bookmarks toolbar

Monday, June 30th, 2008

I hate having “toolbars” under my address bar as it takes away real estate from webpages. Having said that, there are pages that I want access to with one click and not having to go to “bookmarks” and searching for them. I found a cool little way to have your cake and eat it to by moving the bookmarks toolbar items to the main file toolbar. They fill out the otherwise unused space between “Help” and your window controls.

  • Enable your Bookmarks Toolbar under View, Toolbars.
  • Go to View, Toolbars, Customize
  • Drag the “Bookmarks Toolbar Items” from the Bookmarks toolbar to the top bar next to “Help”

Now you can change those items around to have shorter descriptions so they fit. I ended up removing the names and going by just the icons. When you bookmark something that you want in there, just add it to the bookmarks toolbar and it pops up there. Brilliant!

Google AJAX Libraries API

Monday, June 23rd, 2008

Kind of old news, but Google is now hosting the latest and greatest versions of the most popular JS libraries including jQuery, prototype, script_aculou_us, etc

Because of the gzip compression and fast response of google’s servers, these files get to the users fast!

You can either use google’s loader or just link to the permanent paths of the files.

The Ajaxian has a great article on this

iUI is awesome

Monday, June 9th, 2008

It looks like I will be an official iPhone convert here shortly. I’ve been playing with some iPhone looking pages lately at work, and got to use the iUI JS library that Joe Hewitt created.

This library is awesome. It lets you code a page in standard, plain HTML and then converts the CSS/JS to an iPhone look and feel. Also, it sets up your links to enable the “slide in” navigation to work correctly between your links. Plain genius and its oh so easy to use.

With this work and the new “Corporate Friendly” 3G iPhone that is coming soon, I’m hoping to be able to get rid of this POS Palm 700w that I’ve been cursed with, and go to the iPhone for my phone/email device. I’m very excited. We’ll see what happens!