JK Web Studio is a small web design studio, specializing in efficient and user friendly solutions.

Contact us at info@jkwebstudio.com

Success Secrets of the Graphic Design Superstars

January 18th, 2010

Success Secrets of the Graphic Design Superstars

IE9 and SVG?

January 14th, 2010

Hopefully this means that IE will soon support SVG. Or even better, support canvas natively…

http://blogs.msdn.com/ie/archive/2010/01/05/microsoft-joins-w3c-svg-working-group.aspx

New Muppet Vid: Bohemian Rhapsody

December 9th, 2009

New Muppet Vid: Bohemian Rhapsody

Capturing both a Mason component’s output and return value

December 2nd, 2009

From the mason manual:

As of 1.10, component calls can accept an initial hash reference of modifiers. The only currently supported modifier is store, which stores the component’s output in a scalar reference. For example:

my $buf;
my $return = $m->comp( { store => \$buf }, ‘/some/comp’, type => ‘big’ );

This mostly duplicates the behavior of scomp, but can be useful in rare cases where you need to capture both a component’s output and return value.

This modifier can be used with the <& &> tag as well, for example:

<& { store => \$buf }, ‘/some/comp’, size => ‘medium’ &>

24 ways - web design and development articles and tutorials for advent

December 1st, 2009

It is that wonderful time of year again. Head over to 24ways.org for you daily dose of web design and development articles and tutorials.

Bookmarklet for easy switching between development and production web environments

November 30th, 2009

When I develop websites, I like to set up a development site on my local web server. I usually name it the same as the production site, but with a ‘local’ prefix. So if the production site is acme.com, my development site will be localacme.com.

I wrote a little bookmarklet for easy switching between the two sites. It checks to see if the new url starts with ‘http://local’. If it does, ‘local’ will be deleted from the url, if not, local will be inserted.

Here is the code for the bookmarklet:

javascript:(function(){u=location.href.replace(%22http://www.%22,%22http://%22);a=%22http://local%22;b=%22http://%22;l=(u.indexOf(a)==0)?u.replace(a,b):u=u.replace(b,a);location.href=l;})()

Create new MySQL table

October 15th, 2009

CREATE TABLE new_table (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
bool_field tinyint(1) DEFAULT 0,
my_date datetime DEFAULT NULL
);

Adding field to existing MySQL table

October 15th, 2009

alter table table_name add new_field_name int(2) default 0;

Adding server side includes to JS and CSS files

October 7th, 2009

Add the following to apache.conf to use server side includes in JS and CSS files:

AddType application/javascript .js
AddOutputFilter INCLUDES .js
AddType text/css .css
AddOutputFilter INCLUDES .css


Options Indexes FollowSymLinks MultiViews Includes
AllowOverride All
Order allow,deny
Allow from all

Changing ENUM values

September 30th, 2009

ALTER TABLE db.table_name CHANGE COLUMN old_column_name new_column_name ENUM(’first’,’second’,'third’) NOT NULL DEFAULT ‘first’;