Archive for the 'programming' Category

1 make a comment

Uploading and MIME types in CodeIgniter

I just ran into a nasty issue when uploading MP3 files with the CodeIgniter PHP framework. Apparently an MP3 can either be ‘audio/mpeg’ or ‘audio/mpg’. CodeIgniter is only set to accept ‘audio/mpeg’; OS X seems to use ‘audio/mpg’.

This can be fixed by editing the mimes.php file located in:

system/application/config/mimes.php

Search for the line:

'mp3' => 'audio/mpeg'

And replace it with this:

'mp3' => array('audio/mpeg', 'audio/mpg')

1 make a comment

Zep.pl

Holy. Crap. This is the single greatest thing I have ever seen. And, a Python port, Ruby port, and PHP port.

Learn Cocoa: Part II

The concept is to teach Cocoa, Xcode and Interface Builder basics without any assumptions about previous experience with C or IDEs. The approach is basically total immersion, so it’s a “learn by doing” thing.

Check it out

2 make a comment

EM Calculator

Here is a very nice tool to help convert pixels into em units. It also shows how the em unit of a parent element effects the child elements.

I’ve been using em units instead of pixels for a while now and think the somewhat quirky behavior is worth dealing with. Here is a little hack I use:

/* CSS */
div#container { font-size:62.5%; }
p { font-size:1.2em; }
<!-- HTML -->
<div id="container">
  <p>Lorem ipsum dolor!</p>
</div>

The 62.5% in div#container basically resets 1.0em to 10px. So… if you want all paragraphs to be around 12px in size, you set them to 1.2em.

0 make a comment

Mootools 1.0!

Mootools 1.0 has been officially released. The library is modular and can give you a lot of functionality with a small footprint. The download page also includes an option to compress all the components. With all the components and compression turned on, my download was only 36KB. Not bad for having most of the functionality of Prototype and Scriptaculous (and some of its own unique effects).

0 make a comment

DOM Assistant

DOMAss is short for DOM Assistant, and the idea is to provide a simpler and more consistent way to script against the Document Object Model (DOM) in web browsers…
…Being modular and lightweight has also been two very strong demands I’ve had on the library, so to make sure you only use as little code as possible, as opposed to including large libraries where you, in the end, only use 10% of what’s included.

Looks easy to use and is well documented. Give DOMAss a try.

Cocoa Tutorial for Absolute Newbies

Thank you!

After talking to a number of people recently and reading some blogs, I decided it’s time to show some love to the newbies. The newest tutorial at Cocoa Dev Central is simply called Learn Cocoa…

Update: I forgot the link! Learn Cocoa

2 make a comment

sIFR 3.0 Beta

sIFR is meant to replace short passages of plain browser text with text rendered in your typeface of choice, regardless of whether or not your users have that font installed on their systems. It accomplishes this by using a combination of JavaScript, CSS, and Flash, which renders the font. It degrades gracefully if Flash is not present.

Compared to sIFR 2 the new version is radically different. Backwards compatibility has been broken, but that’s okay since deployment is now ridiculously easy. There’s great control over how the text is rendered inside the Flash movie: you can easily use bold and italics together, or use different colors. There’s support for leading, kerning and opacity, filters, blend modes and anti-aliasing.

Read about sIFR 3 beta here

Categories

Archives

Buddies

More

Jerry Nummi is a web designer working in Columbus, Ohio with the great Ruby hackers at EdgeCase. You can follow him on Twitter and Flickr. You can also check out his sweet side projects Expo and JoeMetric.