April 22nd, 2008 smoove
While Firefox is definitely my favorite Browser for both, work and surfing at home, I always found the GUI quite overloaded. Everywhere are buttons and toolbars I never use that take away a whole lot of viewport space. So, in this article I will show you how to minimize Firefox’s GUI in a few easy steps.
Read the rest of this entry »
July 24th, 2007 smoove
Do you really use the remote that came with your MacBook?
Read the rest of this entry »
July 23rd, 2007 admin
Do you care how other people see your website? You should!
Read the rest of this entry »
July 22nd, 2007 smoove
Here are my top 8 favorite Firefox Add-ons for web-development, everybody in our company uses these Add-ons to help them be as productive as possible.
Read the rest of this entry »
July 20th, 2007 smoove
Here is a little Photoshop layer-style that i made for a website I’m currently working on. I think it’s pretty neat, so i’ll share it with you
You can use it on pretty much every shape, if you have a very small shape you might have to adjust is the stroke->size in the layer-style.
Preview:

click to enlarge
You can easily change the color by adjusting the Color Overlay of the layer-style.

To load the layer-style simply extract the archive you downloaded, copy the file glossyButtons.asl to Your_Photoshop_Directory\Presets\Styles and load it in Photoshop (”Styles” window -> load…)
I hope you like it.
July 20th, 2007 smoove
I just want to share a link with you that is found earlier today.
On the website http://www.abuse.net/relay.html you can test whether or not your server can be used as spam-relay.
The website states that the application is “experimental” at the moment, but it is sure worth checking out.
Pretty handy if you don’t want to end up in anti-spam blacklists like spamhouse.org.
July 19th, 2007 smoove
Today i want to show you a little trick that allows you to backtrace function calls (finding out which function called the function you are currently in)
Lets start with an example script, i will explain the details below.
function getThisName
($arg1,
$arg2)
{
logIt
('Log Message...');
return;
}
function logIt
($msg)
{
// this is where the magic happens:
$backtrace =
debug_backtrace();
//demo: output log to browser
echo '<b>Log Message:</b> "' .
$msg .
'" - in file <b>' .
$backtrace[1]['file'] .
'</b> Line: <b>' .
$backtrace[1]['line'] .
'</b> - Function: <b>' .
$backtrace[1]['function'] .
'()</b><br /><br />';
//it is a good idea to also output/log the arguments given to that function - very nice for debugging
echo '<b>Arguments:</b><br />';
// parse all arguments
foreach($backtrace[1]['args'] as $argument)
{
echo '* ' .
$argument .
'<br />';
}
}
getThisName
('This is argument 1',
'This is argument 2');
This will output:
<strong>Log Message:</strong>
"Log Message..." - in
file <strong>/
var/www/site/tracing.php</strong> Line: <strong>
26</strong> -
Function: <strong>getThisName
()</strong>
<strong>Arguments:</strong>
* This is argument
1
* This is argument
2
So, what the above script does is:
- function getThisName() is called
- getThisName() calls function logIt()
- logIt() loads the result of debug_backtrace in an array
- logIt() outputs the result
How it works
debug_backtrace() will return an array that looks like this:
Array
(
[0] =>
Array
(
[file] => /
var/www/site/tracing.php
[line
] =>
4
[function] => logIt
[args
] =>
Array
(
[0] =>
Log Message...
)
)
[1] =>
Array
(
[file] => E:roottracing.php
[line
] =>
27
[function] => getThisName
[args
] =>
Array
(
[0] => This is argument
1
[1] => This is argument
2
)
)
)
So as you can see you have one array with multiple arrays in it, every array represents one level.
The array with the key [0] is always the function that calls debug_backtrace() - in our case logIt(), the lowest level.
Key [1] is one level above the one that is calling debug_backtrace() - in our case getThisName(). If there a more levels, there will be more arrays, one for every level.
So you could say $backtrace[2] to get the details of th function that called getThisName.
This means you can backtrace very complex function calls, wich will help you to debug your php scripts.
I hope this information was useful for you, i use it pretty often since i found out about this great php feature.