We’re featured on the Magento Showcase!

Magentique homepage featuring Skywire client ARMREVOLUTION

Magentique homepage featuring Skywire client ARMREVOLUTION

Great news – our beautiful e-commerce website for ARMREVOLUTION using the Magento e-commerce engine is featured on the Magento showcase website Magentique.com!

Magento is a pretty good e-commerce engine and although obviously not as well tailored towards Luxury brand requirements as our own Skycart e-commerce platform is (*of course we would say that!), we’ve started to offer Magento as an alternative build platform for e-commerce sites going forwards as it does have the ability to have a commercial support agreement in place which is a good thing for our larger International clients :-)

New Pringle Autumn/Winter 2010 Womenswear Show

We love doing these for Pringle and here is the latest one (also shown on their homepage) from London Fashion Week last night!



Line Continuation on Javascript

User the \ to continue lines.
var message = ‘Jack just come across this and \
thought it good to share \
as it\’ not that commonly \
used these days ( \
used to be popular in Perl \
)’;

courtesy of: http://snook.ca/archives/javascript/multi-line-javascript

How to use bash to keep rerunning a script

This is a useful little snippet that i found from here. It allows you to run a small script in bash which then recursivly calls your main script. The effect is that the main script will keep getting called once it’s exited. Useful for monit type monitoring etc. I used it to go through a mail box and delete e-mails that were no longer of use. Becasue of the memory restrictions in place on the server, i could only do about 2000 in one script call,  and i had about 400,000 to go through. Once i set this bash script up, it did it in a few days for me without me having to check it all the time, or re call it.

#!/bin/sh
while [ 1=1 ];
do
if [ ! "$(pidof php5)" ]
then
nice php5 email_cron_delete.php
fi
sleep 40
done

What this does is check to see if the php5 process is running, and if not, call my script. It then waits 40 seconds and then sees if the process is running or not. If it’s not, it then calls the script again.

Bang and the Skype is gone

Just a quick one on how to tell a browser not to initiate the SKYPE tool bar integration into webpages when it sees a telephone number. Just add the following inside the section of your HTML:

<meta name="SKYPE_TOOLBAR" content ="SKYPE_TOOLBAR_PARSER_COMPATIBLE"/>

Reference: http://blogs.creative-jar.com/post/Stopping-Skype-plugin-replacing-phone-numbers.aspx

Htaccess redirect on the same domain

So you’ve built some of a site, but not all of it. But you still want to put it live with the parts you have build. The problem: how to keep users away from the parts you haven’t finished yet.
In this problem, i’ve created a site and in the site is a blog, in the folder /blog/ . The problem is how to redirect all traffic from the root and all other folder to the blog folder.
This can be done using the following directive in your .htaccess:

RewriteCond $1 !blog/
RewriteCond $1 !assets/
RewriteRule (.*) /blog/$1 [R=301,L]

The first 2 lines stop the rewrite from working on the blog/ and assets/ folders (my css and images are in assets/. The 3rd line rewrites every request to /blog/ using a 301 permanent redirect

Changing time information on a linux server

Most of our servers are set up in America, so the time on them is usually American as well. We need to change these to being British times for most of our clients. Here’s how:
date
This shows the current date on the server.
export TZ=GB
This sets the server timezone to British. You may need to check the timezone is available in /usr/share/zoneinfo/
date -s 18:21
This will set the time to 18:21.
Check the time has filtered into mySQL by using:
SELECT NOW()
on the mySQL server.

SVN exclude directory from commit/update

This is intended to be used instead of using the propset:exclude command. I want to no longer subscribe a folder to the SVN repository:

svn update --set-depth=exclude folder/to/exclude

This leaves the folder intact, but unsubscribes it out of future SVN updates/commits

SVN Common errors and how to fix them

1. SVN error: invalid date at entry 5 in entries …..
This is caused becasue the dae for a file that goes into the entries file ir wrong, and is usually set to the year 1969 or 2160
Solution:
find . -name "entries" -print | xargs sed -i 's/1969/2007/g'

2. Unversioned file of the same name is already in working dir.
This is usually becasue you have 2 similar named files in the repositry, one with uppercase and one with lowercase: Image.gif and image.gif
Solution:
svn update --force

Adding a Folder to SVN and immediatly use it as a checked out copy

So we have a folder we want to add to SVN, but we also want to have that folder as a checkout out copy. Here’s how to do it:
svn mkdir file:///root/svn-repository/newproject \
-m "Make a directory in the repository to correspond to /newproject"
cd /newproject
svn checkout file:///root/svn-repository/newproject .
svn add *
svn commit -m "Initial version of my files"

3 visitors online now
3 guests, 0 members
Max visitors today: 3 at 02:10 am UTC
This month: 7 at 03-01-2010 11:17 pm UTC
This year: 28 at 02-08-2010 06:03 am UTC
All time: 28 at 02-08-2010 06:03 am UTC