[sourcecode language="php"]
# show full path of current dir in linux command prompt
PS1="[\u@\h \w]\\$ "
[/sourcecode]

[sourcecode language="php"]
# show full path of current dir in linux command prompt
PS1="[\u@\h \w]\\$ "
[/sourcecode]
WordPress can have the disconcerting habit of inserting a space between the < and ?php when you want to show a code block in a syntax-highlighter plugin. To cure this, go into your WP Admin page, select the Settings menu, Select the writing submenu, then uncheck the WordPress should correct invalidly nested XHTML automatically option.
Occasionally a web page jumps horizontally because a switch of page or change of content causes a vertical scroll bar to appear.
This can be avoided with a little CSS trick;
1 2 3 | html { overflow-y: scroll; } |
This can be placed in the <head> element of a page that is prone to the problem, or in the header include file for a site.
The result of this is that when a vertical scroll bar is not needed on a site, its place is taken by an unobtrusive pseudo-scroll bar, greyed out like other inactive controls.
This is a collection of useful links for web development. Not my content, but useful nonetheless!
Here's a useful function to strip the extension off of a filename.
if($ext !== false) { $name = substr($name, 0, -strlen($ext)); } return $name; |