Prevent line breaks on a forward slash

Need to prevent “£/$/€1,000,000!!!” or similar breaking over two lines at the forward slashes? CSS word-break, word-wrap, white-space not working for you?

On migrating and merging WordPress (local to remote)

Few things to note on the process of bringing this site to life…

Mac OS Apache ownership fix

Because the Apache user on a Mac OS X box is called “_www” not the more Linux-common “apache”…

More RegEx renaming in Adobe Bridge

More examples of using Batch Rename RegEx in Bridge using Regular Expressions… 1. Find year/month in yyyy-mm format at the beginning of a filename: ^[0-9]{4}-[0-1][0-9]- (Remove the caret symbol ‘^‘ if you’re searching for it anywhere in the filename) 2…. Continue Reading →

Building a GIT changelog with PHP

The below PHP generates a cachefile used to display a GIT changelog. (Because I didn’t have the power to get GIT installed onto the production server…) If the following simple script in your repo directory doesn’t do it you may… Continue Reading →

Quickly search for a file on a (PC) server from a Mac client

Searching for files on a Windows server from a Mac can be very slow or even fail altogether but with a bit of shell trickery it’s very quick. The script below is 95% instructions – the payload is at the… Continue Reading →

Dynamically create a PHP variable name

Thanks to this post “Dynamic variable names in PHP” for enlightening me on how easy this is. There’s a lot of stuff out there about PHP variable variables but if you just want to craft a variable’s name based on… Continue Reading →

Arabic text in Adobe Photoshop

…or how to create any right-to-left script layer in Photoshop Photoshop is not fully prepared for working with right-to-left (RTL) languages: you can’t properly use Arabic or Hebrew for more than pasting in single non-breaking lines. This is a limitation in… Continue Reading →

A simple regex rename with Adobe Bridge

Adobe’s Bridge application has a very handy built-in file renaming utility. If you need to add a suffix, a numeric prefix or do a simple string substitution it’s ready and waiting just a keystroke away… But for more complex string… Continue Reading →

Acrobat batch extract pages

Based on an example script provided by Adobe. [ Adobe’s PDF documentation for Batch Sequences ] [ Further documentation and Acrobat SDKs at Adobe ] [ Good Acrobat JavaScript prefs (main required settings are on by default – but you can take the opportunity to enable… Continue Reading →

Remove and ignore dreamweaver dwsync.xml files from your GIT repo

1. Remove any files already added form the working directory. For example: $ git rm -f *dwsync.xml 2. Set up (or create) your global git ignore file in your home directory: $ printf “dwsync.xmlnThumbs.dbn” >> ~/.gitignore 3. using git config… Continue Reading →

Hard coding your site URL in WordPress

I discovered this handy feature when troubleshooting a login problem for a client of mine. If you swap your WP database between your local development and production server at all regularly — and don’t fancy editing your site URL and… Continue Reading →

Nice WordPress article in .Net

Nice article about WordPress in my favourite web design and develpment magazine (issue 217  of .NET). Usual stuff but well written without either speeding or jabbering. There’s a nice overview of Custom Menus, Multisite, Custom Post Formats, Custom Post types and… Continue Reading →

PHP 101. Basic stuff: get value from URL querystring with PHP

As I’m still an idiot when it comes to media queries and mobile devices and can pass this stuff on to other folks – but needed to give myself and the interested parties a visual representation of how different sized… Continue Reading →

JavaScript redirect based on referrer

Basic stuff (as often the case not immediately findable). You want a simple script to redirect to a different page if te referrer is such and such. In the following example the two referral page options ( foo.html and bar.html… Continue Reading →

CSS 3 pseudo-classes and attribute selectors in Internet Explorer

Thanks to my mate Tony I’ve been introduced to this rather delicious (and very small) jQuery plugin that adds support for, among other things the :nth-child pseudo class. If this had been around a year ago ‘d have avoided having… Continue Reading →

Getting a page ID in WordPress

Q. Want to get something in your theme to work with data from a particular page or post – but don’t know for sure what that post’s ID is? A. Try this in your functions.php file: …then you can then… Continue Reading →

Passing a variable about in a WordPress theme

I’m used to using php variables set in included file being used in another included file if all are included in the same document. This doesn’t work in WordPress theme parts. It’s easy to overcome though… you just need to… Continue Reading →

Multiple WordPress excerpt lengths

Q. Got a theme that needs two different excerpt lengths? A. Found here: set the standard, longer excerpt as normal in the functions.php file and the override locally using this code:

Rollback a GIT commit

GIT is great, Git is good. I mostly use git to track changes (very useful to check on what I’ve  been up to when it’s late in the night!) but occasionally I need to use it to roll back to… Continue Reading →

Using GIT to manage a website…

Nice little write-up on pushing your local GIT repo to a live web site: http://toroid.org/ams/git-website-howto

Magazine framework in Javascript

treesaverjs.com/ Incredible, clever, simple looking demo: http://demo.nomadeditions.com/real-eats/index.html

MySQL Command Line stopped working in Mac OS 10.6?

Do what this guy says and add /usr/local/mysql/bin back into your paths file

Turn a text list into an HTML Select Option list with PHP

Easy solution to this basic HTML coding need posted over at Stack Overflow by a random clever bloke. Thanks RCB. My only issue was with UTF-8 characters coming through garbled. Bodged a workaround using this encode entities plug-in for Dreamweaver.

CSS in PHP

The last time I tried to render CSS through PHP was many, many moons ago. I didn’t work and I couldn’t figure it out. Yesterday I tried again and found out why… the MIME type must be set as text/css…. Continue Reading →

Weird line-height in Chrome?

Specifying line-height on an <a> in a <li> will not work in your webkit based browsers. Line-height needs to be set on the containing <li> to work at all in Chrome or consistently in Firefox. Now you know.

The CSS reset has been reset

The grandaddy of all CSS resets hits version 2.o beta: Eric Meyer’s Reset Revisited. See also the subsequent thoughts on how to handle :focus. Update! Now at Beta 2.

Image free CSS arrows/pointers/triangles

Great to finally see [forgive my split infinitive] a well documented walkthrough on how to create these little bit of magical CSS that add triangular pointers onto your navigation elements – or Talk Bubbles as Stubbornella OOCSS has them –… Continue Reading →

The IE9 hate starts here…

Made me grin/grimace…. A piece on how retarded Microsoft’s latest incarnation of Internet Explorer may turn out to be, despite the hype: http://css3wizardry.com/2010/08/14/ie9-is-the-ie6-of-css3/ [waybackmachine] Oh dear.

On CSS image replacement techniques and SEO

Having learnt that properly structuring headings is very important to SEO but wishing to be able to style and design pages beyond the limitations of HTML text I’ve often reverted to this old CSS hack to replace heading text with… Continue Reading →

PHP web forms

Websites are a point of contact – and a contact form that sends an email is the way to normally handle enquiries. (Of course phone numbers/addresses must first be easy to find!) A contact form requires a web server to… Continue Reading →

Got an “Error establishing a database connection” in Mac OS X 10.6?

At some point in the last month (been on holiday mostly) an Apple system update caused MySQL to stop running – all local development sites using MySQL would give the dreaded “Error establishing a database connection” error message. And phpMyAdmin… Continue Reading →

Getting a local version of Cufon running on a Mac

The easiest route to web fonts, Cufon, is suffering a couple of issues at the moment – somebody may be trying to give the service a hard time with a nasty font. If you ever have this trouble getting a… Continue Reading →

How to tile a print using Adobe’s Creative Suite (CS5)

Do you need to print an oversized graphic document onto multiple sheets of paper (that your printer can handle) so you can then assemble/[Sello]tape/mount an accurate large format version? This is a very simple task but strangely difficult to find… Continue Reading →

Safari: how to restore all windows from last session using Time Machine

It’s really very simple – everything you need is in ~/Libaray/Safari/LastSession.plist just quit Safari and restore that file from when it was good and you’re done. What’s this about? Well I tend to use open Safari windows/tabs to help keep… Continue Reading →

Avoid WordPress Trackbacks within your own site

So you’re doing the right thing and crafting internal links within your site to give the thing meaning and usefulness (or SEO)… but WordPress then adds superfluous trackbacks in the comments of the pages/posts your linking to… There are plugins… Continue Reading →

© 2007-2020 qreativbox/Gabriel de Kadt — Powered by WordPress

Qreativbox Hack of BaskervilleUp ↑