How to stop the server in RailsFriday, 03 July 2009It is quite simple to do, just need a little Linux know how.
To stop the server you need to kill it. Thus you use the kill command. Not so fast, you first need the "pid" for the process. Much like in Windows where you open the task manager and you kill a process.... Read more |
How to Truncate in ModelsThursday, 11 June 2009
I recently had the difficult time of trying to truncate a string in a model. Rails enforces this policy because truncation is thought to be in the domain of the view of the data. This makes sense, because you are "seeing" a portion of the string. However, in this case, I was... Read more |
Stripping out HTML Tags in jQueryFriday, 01 May 2009One of the useful features most JavaScript libraries offer is the ability to strip out HTML tags from strings, leaving only the text. This is useful because you may have user input that you need to "sanitize" by removing potentially malicious HTML.
Luckily this is... Read more |
Adding Share on Facebook LinksFriday, 24 April 2009You know those Facebook links that allow you to post directly on Facebook? They are both highly useful and easy to add to a site.
To include one on your site, just cut and paste the code from Facebook. You can visit this link to see the options available:... Read more |
CSS Naming Convention Best PracticesMonday, 05 January 2009
Read more |
Calling any JS lightbox from Flash using jQueryMonday, 17 November 2008
Thanks to Flash's ExternalInferface's API you can call javascript or receive a callback from javascript from/to flash. In this example I will show you how to call any lightbox that is in javascript from flash.
Read more |
Making IE have more than one background per elementThursday, 30 October 2008Thanks to IE being a crappy browser we can hack it to do actually some interesting things. One being more than one background per element. For instance, to a single unique <div> you can give it more than one background. We can do this by utilizing IE's filters.
Here's... Read more |
jQuery normal text to seo urls in real timeThursday, 23 October 2008
It is also a good lesson on how jQuery can instantly return text and the use of simple regex.
demo:
javascript:
function seoFriendlyReplace(orginal, seoFriendlyElement, edit)
// time to write it and call the change function to update the seo friendly text box.
... Read more |
jQuery image rotator auto-switcher (OOP)Wednesday, 22 October 2008
Read more |
Setting Up a Windows Vista Development EnvironmentSaturday, 11 October 2008I recently purchased a new computer and was faced with the task of setting up a fresh installation of Windows Vista with all of the web development goodies I've come to know and love. Here's a walkthrough for what I did to get set up, starting from square one. This is literally... Read more |
Website ChecklistTuesday, 30 September 2008As a web developer, whenever you take on new projects you'll often find yourself doing the same tasks, over and over. I find it convenient to keep a checklist as a template that I use for new projects. Read more |
Using Blogger for Content ManagementMonday, 01 September 2008Despite the name, Blogger isn't just limited to blogs. It actually makesfor a nifty Content Management System (CMS) for a wide range of sites, including e-commerce, informational and educational sites. I've found it to be an easy and inexpensive (well, free) solution for simple... Read more |
PHP Starter TemplateMonday, 01 September 2008Since Alex posted his HTML Starter Template article last week I was inspired to condense some of my starter code for building sites in PHP.
I use Aptana to code, so whenever I make a new project, I start by copying in files from 2 template projects I've made, xhtml-template and... Read more |
MooTools 1.1 CheatsheetMonday, 01 September 2008This is probably old news to most MooTools developers out there but if you are just getting into MooTools, it's a life-saver. In June 2007, Maik Vlcek of the mediaVROG Blog posted this excellent MooTools cheatsheet. Read more |
HTML Template StarterMonday, 01 September 2008
Read more |
What Are Good Styles to Use in All CSS Stylesheets?Monday, 01 September 2008
Read more |
Redefining console.log() For Browsers Without FirebugMonday, 01 September 2008
I use Firebug's console.log() method extensively when developing code. But, when viewing the site in Internet Explorer, Safari, Opera or other browsers that don't have Firebug, console.log() throws an error. Rather than wrap each log statement in a try/catch, I just add this... Read more |
JavaScript Challenge: Cardinal NumbersMonday, 01 September 2008This challenge is to write functions to add and subtract numbers using the names of numbers as strings. More precisely, the challenge is to write add() and subtract() functions that take two strings as input, and return one string. Read more |
JavaScript Method OverloadingMonday, 01 September 2008
A feature of languages such as Java, C# and C++ is the ability to overload methods with multiple parameters. Overloaded methods execute different code depending on the type and amount of parameters supplied-- in other words, the type signature of the method. Thus,... Read more |
Managing Cross Browser issues with JS browser detects & Conditional CommentsMonday, 01 September 2008Until all browsers completely comply with w3c specifications we have to find workarounds in order for our websites to be pixel perfect in various browsers. The browsers we need to be most concerned with include Internet Explorer, Safari, and Firefox. Firefox is a web developers... Read more |
Firebug Tutorial: Getting StartedMonday, 01 September 2008 Firebug is a plugin for Firefox that greatly aids CSS and JavaScript debugging. This guide will walk you through installing Firebug and using some of its functionality, including debugging JavaScript, inspecting the DOM and editing CSS on the fly.Getting StartedFirst, make... Read more |
Retaining Middle-Click Functionality With JavaScriptMonday, 01 September 2008Browsers such as Firefox and Internet Explorer 7 allow users to middle-click on links to open them in a new tab. Oftentimes, JavaScript will be used to add an onclick event to a link that supersedes the link itself. But, when a Firefox or IE7 user middle-clicks the link they may... Read more |
IE Plugin to Detect JavaScript Memory LeaksMonday, 01 September 2008Microsoft has released a free beta version of a plugin for Internet Explorer that looks for memory leaks. The plugin, plainly titled JavaScript Memory Leak Detector (download), is available immediately and tests for both IE6 and IE7 leaks. Apparently, IE6 has far more leaks --... Read more |
Using Conditional Comments to Mitigate Browser QuirksThursday, 05 October 2006
Read more |
The True Tribe Redesign Coming SoonWednesday, 27 August 2008As you may have noticed, The True Tribe has been on a bit of a hiatus for articles over the past couple of weeks. This is because we have been devoting all of our effort into developing an entirely new site, built with Joomla rather than our current implementation on Blogger's... Read more |
Installing Synergy For Linux and WindowsWednesday, 27 August 2008 Synergy is a great app that allows you to control your Linux and Windows computers via a single keyboard and mouse. You can plug in the keyboard/mouse to either Linux or Windows machines and fluidly switch between computers just as easily... Read more |
What's New in MooTools 1.2Wednesday, 27 August 2008 I'm happy to announce that MooTools (Wikipedia link) has released version 1.2 of their excellent JavaScript library. MooTools, which stands for 'My Object Oriented Tools', was developed in 2006 by Valerio Proietti and his colleagues. It evolved out of Moo.fx, a lightweight... Read more |
Javascript image rotator viewerWednesday, 27 August 2008See a demo at http://www.alexgrande.com
It is the images on the top right.
I wrote this in Object Oriented format so you can use it again again on page.
Javascript:
var ImageGallery = new Function();
ImageGallery.prototype = , 5000);
// This lets the browser know to do... Read more |
Saving State: What To Do When Users LeaveWednesday, 27 August 2008In this era of rich JavaScript applications, so much
focus is given to the features of the application that one
crucial element is often overlooked: What happens when the
user leaves the page? We take it for granted that pages
will look the same... Read more |
Stylize the last element in jQueryWednesday, 27 August 2008
Here is how to stylize the border of the last element using jQuery.
$(function() );
You can compare to prototype by going here Read more |
Stylize the last element in prototypeWednesday, 27 August 2008Here is an example of removing the last border in a list of elements.
document.observe(”dom:loaded”, function() );
You can compare to jQuery by going here Read more |
AJAX Google API to Minify Javascript using Ruby on RailsWednesday, 27 August 2008 In discussing how to best optimize JavaScript performance in Ruby on Rails, this article focuses on one aspect of JS performance optimization, namely, writing a build script to concatenate/minify the JS, and setting up Rails to easily toggle between the compressed and normal... Read more |