Before I get into the details of this article (that will explain how to download and customize ringtones for free) let us take a moment to respect the complete awesomeness that is the G1.
Why is the G1 so awesome?
- Real Web Browsing
- Google Integration (my life runs on Google)
- Free Applications to do just about anything, yep free
- Free ringtones!
- Mp3 Player
How do we get free ringtones? Free custom Ringtones? It’s easy!
read more…
Tools like PuTTY and Cygwin allows users trapped in a window’s world to retain some of the power and functionality of ‘nix platforms. Together or independently they allow users on windows machines to SSH, SCP and interface with Linux, Unix, Solaris, or even AIX nodes. The absolute best part? You can generate a pair of keys to make remembering passwords a thing of a the past. This is especially important to one’s sanity if you work in an environment with 10s or 100s of different nodes that all have rotating IDs on different schedules.
So my goal in the article that follows is to setup a powerful workstation that includes Cygwin, PuTTY, and WinSCP. WinSCP is not a necessary tool, but I’ll admit I like to resort to a graphical SCP tool every now and again. Unlike a few other articles I have read I will not encourage you to use passphrase-less keys, just too risky in my mind. Instead we will just limit the number of times we need to enter that password to say about…. 1.
To recap, our Goals are;
- Install powerful windows based tools. (Cygwin, PuTTY and WinSCP)
- Generate a pair of 2048 bit RSA keys (With a passphrase)
- Disseminate the public key to all the nodes we know (or connect to)
- Employ Pageant and SSH-Agent to limit the need to enter that single passphrase.
So let’s get started.
Wow, that title is a mouthful.
Basically i figured out how to use SYSDATE and some other temporal methods to automatically determine the first and last day of the previous month, or previous year.
I needed this to hand off a canned query that can be used by many users without the need to constantly update the date parameters of the query. For instance “Show me sales totals for the previous month!“ or ” What was the total number of transactions last year?”
You could just type something like
Date >= to_date('11-01-2009', 'MM-DD-YYYY')
But that need users to change every month or year… boooo.
The solutions are not too pretty, but they work, And if you have a better way I would love to hear.. Googling proved no avail, and I had to dig this combination from various pieces in an O’Reilly Oracle book.
Without further delay.. read more… 1
This article started as a footnote to an article I wrote yesterday, using ACL in CakePHP . I wanted to outline how the hierarchy structure of the Aro and Aco tables worked, and just what lft and rght columns provided over parent_ID.
I soon realized that my topic, although used by ACL was much broader. Not only is it a standard practice in referential DB’s requiring a hierarchal structure, but it is used by Cake’s Tree behavior as well. So in order to keep some..order in my site I broke it out into its very own article.
read more…
The ACL component of CakePHP can be a daunting undertaking for those new to CakePHP or ACLs. Once you take the plunge though you’ll never look back. The flexibility and power of the ACL component are worthy of your site, I promise. In order to help some fellow bakers into the water I wanted to offer some advice.
This solution allows you to purge all tables from a database without actually deleting the database.
This may not seem practical to those that have full rights and wonder.. “Why not just create a new DB?”.
For others that are using a hosting plan or work for a large company with restrictive bureaucracy will appreciate this simple tip. The reason is that your account may only have specific rights on that Database and absolutely no rights on the hosting server. Even if you had permission to delete the old DB, you would have to jump through hoops to get a new one created. So in short, “Because we can’t”
It has also been pointed out as a way to maintain the schema.
read more…
To backup a mysql database from a unix command line is relatively simple. It is equally easy to automate this task with a shell script and a crontab (cron jobs). In my case I needed to backup ~15 unique databases and I despise repetitious code, so here’s what I came up with.
**Update
Added means to allow different User and password based on current DB.
read more…
So I am proud to say I frequent the CakePHP group on Google, and try to offer my assistance when I can. A lot of times I see people asking how they can validate optional fields, or validate fields that are dependent on others.
An example, sure: Imagine you have an employees model.. yeah all modeled up, that looks good, nice work.
When you get to validation you realize….
To register they must enter either their PIN # or their First and Last Name.
..but not all three.
THere are other scenarios you might think of… Cell or Work phone…. Email or mailing address.. etc..etc.
What gets a little more interesting here is that we should provide unique errors for each possible situation. Initially we can just ask for PIN or names. If they enter just the PIN then they are all set, don’t bother them with either name. If the user enters only their first name we say OK, they are trying names, but we need to ask for their last name, and not worry about the PIN. Same for just their last name, a unique error asking for first name.
As of yet I don’t believe CakePHP has a built in validation rule for such, but that’s no problem. Because CakePHP plays so nice, and is so extensible that it only takes a little bit of thought to make this a relatively simple feat. Curious? Read on!
Spam is bad agreed? Of course. But making readers painfully decode swirled letters and numbers is nearly as bad. That is why many sites will use logic questions to prevent spam and bot activity.
Implementing logic questions on your mail forms and registration is easy for your readers and simple for you. This tutorial walks through the steps to create one using CakePHP. The solution will pick a random question and answer stored in the database and based on desired difficulty. Hooray!
When delivering an application that will be administered by clients I found it best to keep them out of the source code. THis means that any options, any at all, should be editable from a frontend. Site name, taglines and metadata are examples of such settings. Any constants that will be changed (Oxy-moronic I know) can also go here.