Archive for the ‘Utilities’ Category
You are currently browsing the archives for the Utilities category.
You are currently browsing the archives for the Utilities category.
If you have ever tried compiling the GD library on Mac OS X, you know that there are several issues to overcome before it is usable. Not to mention the version of PHP included with OS X wasn’t compiled with this option. In this post I will detail an easy method to update PHP, install MySQL and the GD library in just a few steps.
To start this process, we need to grab a couple of install packages from the links listed below:
Once you have these packages downloaded, we can start by installing MySQL. Open the MySQL image and install the package by following the directions. When the install process finishes, copy the MySQL.prefPane to “your_user/Library/PreferencePanes”. Doing this allows you to start and stop the server from the system preferences window. Finally, make sure you take the time to secure your new installation.
If you had previously enabled the PHP module in the httpd.conf file, make sure you comment it back out.
Using the terminal from: Applications=>Utilities=>Terminal.app
(The following commands are entered without quotes.)
The next step in this process is to install an updated version of PHP with GD support. The great thing about using the Entropy package, is that all of the hard work is already done for you! Open the installer and click the customize button if you don’t need all of the included extensions.

Once you have chosen the extensions you need, click install. When the install finishes, the last thing we need to do is edit the php.ini.
Using the terminal from: Applications=>Utilities=>Terminal.app
(The following commands are entered without quotes.)
Now all you have to do is start Web Sharing from the system preferences window and all of your new features will be ready to use.
GHTime Code(s): nc nc 087f6
Unless you live in a secluded cave in the middle of nowhere, you have undoubtedly heard of a little program called QuickBooks by Intuit. This program comes in a variety of different flavors to suit your personal and/or business needs. This software can be surprisingly simple to use with little to no effort.
In a few cases when I invoice a customer, I will charge them for a product at full price and then a few lines down discount the product to the agreed upon selling price. This helps me to demonstrate the value associated with the services I provide and also allows me to charge more later if the circumstances change. QuickBooks has a special item that is setup for this very discount function.
During my normal day-to-day operations, I received a phone call from a customer that was unable to determine how I arrived at a sales tax figure. Thinking this was a simple error on the customer’s behalf I pulled up the invoice, ran the figures and was shocked when I realized that the math absolutely did not work. Wanting to get to the bottom of this, I asked to call the customer back and began trying to figure the problem out. After working with the problem for a few moments I remembered that my company has a full service plan and decided to call Intuit to report the problem. After jumping through several hoops and being transferred to a level 2 support member, I was told that this was expected behavior. The invoice in question had taxable and non-taxable items on it with the discount appearing at the very bottom of the invoice. She explained that the QuickBooks calculator added all the items up as it went along and when it encountered a discount it treated it as a payment and reduced the previous line items by a percentage.
Let see an example:
Our tax amount will be 8%.
Now we have an item that costs $1 and is taxable: $1 x 8% = $1.08
Another item for $1 that is not taxable: $1 x 0% = $1
A discount of $1 that is also taxable: $1.08 + $1 = 2.08 – $1.08 = $1
Now here is a screen shot from QuickBooks with the same problem:
(Click to enlarge)
As you can see, QuickBooks manages to figure this total to be $1.04. She then explained that the work around to this problem was to add all of the taxable items first, then use the taxable discount and finally add the non-taxable items and a non-taxable discount if needed. I asked if this was going to be improved and was told that I could submit this as a suggestion for a future version as an improvement.
This just goes to show you that you can’t always trust shiny software even if you pay for it and you should always double check your math.
GHTime Code(s): 64a48 nc 08e28In my experience with Linux distributions, Slackware and Ubuntu/Kubuntu, there are a couple of different methods used to update the system. Of course we can always use a gui to do the updates but what fun is that?
The two commands used to update a Debian based system are:
safety@nDarkness:~/bin$ sudo apt-get update; sudo apt-get upgrade
Now while this doesn’t require a great deal of typing, let’s see if we can shorten it to suit our needs.
If you do not already have somewhere to store your personal scripts, the following command will do this for you and allow you to enter the code we will use:
safety@nDarkness:~$ mkdir bin; cd bin; vi apt-auto
Press i for insert and create the following script:
#!/bin/bash sudo apt-get update; sudo apt-get upgrade
This is all we need to type for our script to produce the results we are looking for. Now let’s save our script by pressing Esc => :wq => .
To run our script we can type:
safety@nDarkness:~/bin$ bash ./apt-auto
You should see the output from the two commands used in the script printed to the screen. Now let’s make our script executable so we don’t have to type bash to make it run.
The following command will accomplish what we are looking for:
safety@nDarkness:~/bin$ chmod +x apt-auto
Now to run our command we simply need to type:
safety@nDarkness:~/bin$ ./apt-auto
We now have a working script to do our update process and it is significantly shorter than the first option we used. As always all comments are welcomed.
GHTime Code(s): 47bd7 nc
Have you ever needed to rename a bulk quantity of files and/or folders? In my day to day life, I use template folder structures to contain various aspects of job information. Before these folders are usable, I must add a unique job name to the beginning of the folder and/or file name to make searching easier. This renaming task can quickly become very tedious and time consuming.
Thanks to Denis Kozlov over at [den4b] there is a solution that saves loads of time and effort. The program is called, ReNamer and it allows us to select a list of files and/or folders and perform various renaming operations on them.
Since the task at hand is to work on already designed folder structures, all I need to do is find a method that does the job and save the preset for the different types folder structures. I chose to use a delete rule to remove the generic job name and then an insert rule to insert a unique job name.
After going through a few short test runs, I came up with a working solution that I was able to
save, customize and slightly change to suit other needs.
If you have similar renaming needs, check out this
program and I’m sure you will agree it is definitely worth your time.