Blog

This section contains mostly articles migrated from my old Wordpress site. It was more of notes to myself that I hoped would help others. A few got quite popular. Who knew Oracle SQL was still so hot.

Anyway, I migrated them from wordpres to hugo, integrity suffered, Forgive the formatting please :)

You can check out my Adventure Riding Blog for something different.

Double Battery Lifespan with ESP Projects

Background I’ve been spending more time (and money) on ESP related projects, and recently solved the “how do I stop sensors from using battery power during deep sleep” The impact of it may vary, but for a particular adafruit sensor module, which somereason has an led in it also, uses more energy (additional ~3ma) than I’d like. Shutting the sensor down should save about 3.2 milliamps of draw. For a 2500 mAh 18650 battery, that means 780 hours.
September 30, 2022

Eddie Webbinaro Elected School Board Member

Wow. I am just awed by the support and turnout from this community. You all just totally blew me away. Thanks for everyone who voted, read, shared, attened, and asked. While the current board still needs to approve my election next month for my term beginning July I’m not going to lose any momentum. I already have a list of things to research and understand better, and I look forward to start building relationships with the team.
May 17, 2022

Vote Tuesday, May 17

This is a reprint of my campaign email for School Board Friends and neighbors, We’re just 2 days from the annual Peru CSD vote. When: Tuesday, May 17 from 12 noon to 9pm Where: high school gym, 17 School St. Voter Resources There are 4 propositions on the ballot as well as the vote for your next school board member. I’m hoping this email is an effective reminder to make the time Tuesday, and support me with your vote, but I also wanted to share a few resources to help your decisions.
May 15, 2022

I'm running for School Board

This is a reprint of my campaign email for School Board Hello Friends & Neighbors! I’ve submitted my nomination to be on the ballot for School Board Member for the Peru Central School district. The vote is May 17th from 12:00 noon to 9:00 p.m. (want reminders?) in the High School Gymnasium. I am very excited for this chance to support of our community, and I need your help: If you have any questions or perspectives to share, I’d love to arrange time to chat.
April 4, 2022

We're going metric!

Did you know metric is the preferred system for all U.S. agencies, and required for interactions with commerce?

I feel fortunate that my employer is based in Australia. It’s continued to push me to re-evaluate my ethnocentric views of measure.

It started during a recent converation in our “Makers” channel discussing where and when we see imperial and metric measures used, some of them left the question there for us “Is the US really that averse to metric? Don’t they sometimes use both types of measures?”

Turns out the United States is already a “metric nation” and has been since 1880’s or 1970’s depending on your interpretation.

So if the U.S. Government is metric, why isn’t the nation?

Us. Me.

So read on to see how our household is moving forward!

February 23, 2021

New Name, Same Game

I’ve pushed some changes to this site to reflect an important change - my name! Moving forward I will be using the surname Webbinaro, which is the marriage of my wife’s family name and my own. Webb + Rendinaro = Webbinaro Now, despite the low-hanging joke for an SE and tech speaker it does not sound like webinar but rather Webb-i-nair-o, respecting the roots in my wife’s family surname. Although COVID-19 has slowed our process with the courts a bit, after 4 months of paper pushing we did it.
April 2, 2020

Add Trendnet repeater to a Google wifi mesh

I have a neat little trendnet that I got on sale a while back with the idle idea I could expand my google mesh already 3 nodes strong. I tried a few times without much luck. I Just could not find enough in the documentation to properly configure the repeater without hosing something. What do I mean hosing? It was like roulette trying to get a few principles all working in tandem.
January 15, 2021

Blue/Green Cloud Foundry Deployments in Circle CI

CircleCI is a premier SaaS solution for integrating Continuous Integration pipelines with any any GitHub repositories. The documentation is loaded with example integrations including Heroku and Cloud Foundry, but for Cloud Foundry are limited to simple cf push. This blog posts explores the full configuration required to enable Zero Downtime deployments with the Blue/Green pattern. The concept of a Blue/Green deployment is relatively simple, so long as you’re building stateless web apps or services.
February 21, 2018

Daily standups should not be a status readout

Woah, is this thing on? It has been a while since I’ve ranted or shared anything, but I am trying to get back into regularly sharing my thoughts, however useless they may be. The topic burning in my soul today is the monotony of long stand-ups, scrums, whatever you call the daily ceremony your agile team attends to discuss where the work stands. My opinion on this is simple Scrums are not status meetings!
May 20, 2015

Google using ReCAPTCHA to validate Street View addresses

What is ReCAPTCHA? For those familiar with ReCAPTCHA you know that Google acquired the ingenius tool some time ago. The service provides two features. Spam prevention for site owners, and nearly flawless OCR for Google. OCR is Optical Character Recognition, and is the difficult task of having computers read the words, letters and symbols in scanned text or images. ReCAPTCHA shows 2 words. One word it already knows, which provides the spam prevention.
October 6, 2013

Writing a Custom Widget for Google Calendars

The amount of users who rely on Google Calendars to organize their personal and professional lives is staggering. Seeing as most clients are comfortable and proficient with the technology, there is little reason to point them elsewhere when they ask for a custom widget to display upcoming events on their site. [caption id=“attachment_966” align=“aligncenter” width=“307” caption=“Google Calendars are easy and everywhere, with a robust API we can leverage”][/caption] In fact, the only trouble is that Google’s provided widget layouts are all - er, well they are all quite lame, and likely won’t match your current theme.
August 14, 2011

Verify file Checksum in Windows with context menu

Checking the integrity of a file on a unix node is simple thanks to a confusingly named “checksum” utility. It, oddly enough gives you the checksum of a file. If your stuck on (or just love) windows, you can give yourself the ability to check any files checksum with the click of a mouse. [caption id=“attachment_956” align=“aligncenter” width=“421” caption=“Right-Click any file to validate the checksum integrity “][/caption] Download Microsoft’s FCIV.exe You can download their unsupported command line utility fciv from the following link, http://support.
June 7, 2011

Authenticate Facebook Users in MOdx, and Build a User Profile

Although still very new, and with much to learn I am loving Modx as a tool to quickly build out robust sites. Recently a client wanted to add Facebook Integration to their MODx site. I’ve used Facebook’s API before, and know it makes authentication pretty easy, but I had to figure out to insert that authorized user into Modx’s web context. And it was actually quite easy as well. The user becomes a full blown member, and can be treated the same as any user that registered.
May 12, 2011

Link to element IDs inside a jQuery tabs - read "Stateless"

I recently implemented JQuery’s Tabs feature into a site I am building for a client. My first though was “wow, that was easy.” And then the usability issues starting making themselves apparent. ** I like stateless web. Everything is linkable and bookmarkable, and once you have something the way you want, you should be able to share it with nothing more then the unique and repeatable url.** WHat do I mean by usability issues, let me explain with a few scenarios.
April 26, 2011

Will MODx Revolution bring about change?

Somewhere between CMS and Scaffolding Framework MODx is a PHP based, mm.. tool, for publishing websites. I don’t want to call it a CMS, though If you read MODx documentation, they’ll call it a Content Management System. But in my experience products labeled CMS tend to be inflexible tools that require lots of effort to place widgets on custom templates. I remember using one tool in which you could not have a publicly accessible page not belong to a menu.
April 5, 2011

Manual Update for Nexus One

I am writing this as the release for Gingerbread (2.3) is being slowly released OTA, but the same steps apply regardless of the rom version you are eagerly awaiting. This is safe and repeatable, and I have done it for 3 updates on 2 devices now, so I am very confident nothing will go wrong. Even so, I waive any responsibility if something goes wrong. For the details and pictures, read below the fold.
March 1, 2011

Google TV with the Logitech Revue - First Look and Thoughts

It’s Here ! Google TV powered Revue from Logitech I’ll admit before I go any further that I am a Google fan, and Android developer. When Google sent me the free Logitech Revue I was eager to dig in! But honestly, I’ll do my best to stay neutral. And before I go any further I want to make sure we’re all on the same page about what Google TV actually is or does.
December 7, 2010

Custom JSF Input Validation Styling for any Component

We didn’t have room on our pages for individual message boxes, and also had the need to style specific fields on our JSF pages whenever validation failed on the server, with user friendly field names in the message. Example: “User Name is Required” , and the field for User Name is highlighted red. [caption id=“attachment_864” align=“aligncenter” width=“300” caption=“Custom field styling and nicer field names for JSF validation”][/caption] Unfortunately there are times when jsf insists on inserting field ids into the message.
October 29, 2010

A complex data model with JPA - Inheritance, Stateful Join Tables, and More

I’ve had the recent pleasure/pain of implementing JPA a new Java web application. After reading many misleading blog posts and dead-end mailing list threads I have worked out the major kinks, and thought I would share. A few things first: This not using Hibernate API, or the Hibernate implementation of Java Persistence API The project runs on Websphere 6.1 (WAS6.1), using OpenJPA implemenation of JPA 1 Although our application is new, the data model is fixed as it must align with the enterprises larger customer focused data model.
September 13, 2010

Web Hosting Deal in Celebration of Julygustember ($4.95 + Free Domain)

Yes, you read that right. Julygustember 2010 DreamHost Newsletter In celebration of Julygustember, and the Julygustember 2010 DreamHost Newsletter, I am offering a discount code to all of my readers. The coupon is good for $60 off 1 yr of DreamHost hosting, with a free domain for life! Dig, that’s less than $60 bucks for a year of top-notch, full access, best support money can by hosting - WITH a free domain.
September 8, 2010

Google Voice and Gmail play nice to deliver telephone to pc calls

You may have seen the news recently that Gmail can not place calls to your contacts through the use of a browser plugin, and google voice’s VOIP infrastructure. All you need is a headset or microphone for your PC to send calls. But the best part is the flip side – calls to my Google Voice number can reach me in Gmail chat ! So along with ringing my work extension and mobile phone, I will get your call in my (always open) gchat window !
August 27, 2010

Getting IP addresses for remote nodes

I recently had the need to get the ip address for a remote node. Wait, scratch that.. I had to get the IP addresses for about 60 remote nodes. You’re right… I probably could have typed nslookup targetNode 60 times. But I am a programmer! SO I decided to pass my choir off to a shell script. If you have a similar need, read on! The script is simple, just add all target nodes as a space separated list, and run the file.
July 29, 2010

Passing Parameters with h:commandLink in JSF

I have been growing fond of JSF as of late, but was stumped by the simplest task. How do I associate some value with a link? If I was using PHP I would just append a query parameter and grab the value. But with JSF it’s all done inside our xhtml files, so how do we set a value based on the link clicked? Just use inside the commandAction. This stores any expression into the specified bean’s property.
July 13, 2010

Script to Backup Files (with Version History) Before Editing

Editing config files is the only certain thing above taxes and death (too lame?). Whether it’s your apache setup, or dns bindings its likely you use vi or another favorite editor to open your server’s files, make that needed update and save. If you were good you copied the file first to a backup tagged by date. .. But managing that process manually is just a workflow annoyance. So the script below backups the file, tags it with the date, and opens it for edit.
June 12, 2010

Wireless Tethering for Android Phones

As many of you already know, Google announed during their second IO Keynote on Thursday that the latest version of Android (2.2 - Froyo) to start shipping will include WiFi tethering - or hotspots. This feature allows you to share your mobile phone’s connection with any nearby computer - and its completely legit Phone carriers can be none to pleased, as makers like Sprint already include a hotspot option on their latest EVO, but charge extra for the feature.
May 26, 2010

QueueMan - Netflix manager for Android to see major updates

Anyone who has been to this site more than once likely knows of my Android application for Netflix users. The application supports Android phones like the Motorola Droid, The HTC Incredible, and the Nexus One (among other devices). What none but a few “power users” know is that I am feverishly working to entirely refactor QueueMan in order to introduce long awaited features. The newer version will still be wicked cute, and simple to use, but there are some critical features lacking in the current version I need to address.
May 11, 2010

Plugins for a Full Featured Wordpress Content Manager

More and more clients are asking for dynamic sites that allow them to edit specials and pages at will. This is great because it surely means they will come back for more questions and changes as they use the site. (read : more income). What they want are CMS, or content management systems. What I give them is usually wordpress loaded with useful plugins. (If custom business logic is needed i turn to CakePHP).
May 4, 2010

Backup all sub-directories with a Bash array loop

I manage lots of domains, and offer my clients free backup and recovery service. Nice selling perk, but I best be damn sure I am backing things up regularly. Since there is no way my space-cadet brain would remember that, I rely on my ‘nix friends: bash, cron and tar to neatly package every sub-directory of my webroot into their own little tarballs. The bash script included after the break reads all directories into an array that we can loop through and manipulate as needed**.
April 15, 2010

T-Mobile G1 to ADP (Android Developer Phone)

So I purchased a G1 from t-mobile when they were reasonably new, and have since was kindly donated a nexus one (best phone ever). But what to do with my old G1? Obvi - turn it into an Android Developer Phone that I can run without a sim card, and test my apps on anything faster than the emulator. Not to mention the value of actual phone, accelerometer and leds. I know G1’s are locked, hence I took the action as a good citizen and called T-Mobile.
April 8, 2010

Fedore 13 Beta - First Impressions

I was tempted to run with the Fedora 13 Alpha, but just found out this morning that Fedora 13 Beta RC1 is publicly available. Fedora 11 was still treating me fine. But I was curious to see the changes, so I ran a complete re-image of my machine. What did I find? The Installation The installation looked good and went smooth. Still doesn’t support wlan authentication during install :( [caption id=“attachment_696” align=“aligncenter” width=“300” caption=“And it begins.
March 28, 2010

XML vs JSON

I recently read an article on Linux Magazine that suggested JSON is a better tool for data transfer than XML on Android phones. So I decided to try switching some of QueueMan’s queue retrieves over to JSON. Eliminating the verbose tags may be much quicker over wireless airwaves. The choir I tackled was to compare the performance of XML and JSON by downloading the user’s recommendations from the Netflix API. To make testing quick I would make a call to both XML and JSON classes in each loop, and repeat 10-30 times for each sample point.
March 27, 2010

My Free Google Phone Arrived!

I never posted the start of this story. To be honest I thought it was a scam, and didn’t want to boast about being burned. BUT alas it is not a scam! - The phone arrived as promised and ahead of schedule. [caption id=“attachment_682” align=“aligncenter” width=“300” caption="‘heres yer phone, thanks for rockin’"][/caption] So if you did not infer from the text of the letter, or just can;t read it in that tiny photo, here’s the background.
March 24, 2010

Running Pligg on Nginx - Rewrite rules

As I mentioned in my article “Migrate form Apache to Nginx and keep rewrite rules intact”, Nginx is an awesome and lightweight web server. The only trouble I have ran into since the switch is Pligg. The htaccess file is ridiculously complex, and I suspect some of the rewrite rules to be repetitive or overlapping in areas. Using the rules from my past article though I was able to get nginx rules in place that seem to work.
February 19, 2010

Migrate from Apache to nginx (and keep rewrites intact)

nginx is a very fast and very lightweight web server that can handle static HTML blazingly fast, and does very well with dynamic (PHP) content as well. In fact the very site your viewing is running atop of nginx. nginx isn’t ideal for every server, and can’t handle SVN or WebDAV among other protocols. But for your average site running PHP, Ruby or Django, nginx is choice. The trouble was that I have lots of site (like this one!
January 28, 2010

Google Nexus One for only forty nine dollars ($49)

Everyone is talking about Google’s Nexus One. Most people are saying that an unlocked phone for $529 just won’t fly here in America. We like our phones with a ridiculous amortization attached through 2 year contracts so we feel like we’re getting a deal. Sure we end up paying far more than the phone is worth - but we don’t pay it all at once. That’s the American way - defer.
January 17, 2010

Netflix on Android - from G1 to Droid

I wrote a month or two ago about my Android application for Netflix subscribers. The application allows users to fully manage their instant and disc queues, browse recommendations and search all titles. The reason then for this post is to share an update and gloat a bit. QueueMan has a whole bunch of new features, has been downloaded nearly 5,000 times (Update: Over 10,000 times!), is tested and proven on Motorola’s Droid platform, and is getting quite positive reviews compared to other Netflix apps on the market.
January 5, 2010

Google to Offer New Phone Direct to Consumers in 2010

Android was a nice start, but… For sometime now Google has been offering its custom built mobile OS - Android - to various carriers and manufacturers. News has been released however that the company plans to offer its very own phone direct to consumers by Quarter 1 - 2010. Summary Here’s what seems to be the consensus among the community, mostly based on leaks, or supposed leaks from Googlers. Hardware: HTC built Software: Android 2.
December 14, 2009

Running Android SDK on 64bit Fedora 11

I just got up and running with Fedora 11 after Ubuntu finally pushed me over the edge. Every update seemed to break something else for me. But anyway Fedora is great, save one small caveat - I couldn’t run any 3rd party 32bit applications. Ok, make that one huge caveat. Consider some critical apps like Flash, or Android SDK that just wouldn’t fly. Rather than downgrade my distribution to the 32bit flavor (which too would solve this dilemma) I opted to keep my 64bit distribution and just add the needed 32 bit binaries.
October 25, 2009

Netflix Queue Manager for Android phones

QueueMan the Open Source Netflix queue management tool for Android Devices QueueMan aims to be the Open Source Android application for Netflix subscribers. And it has already gotten some great reviews. [caption id=“attachment_628” align=“aligncenter” width=“256” caption=“Netflix application for Android devices (Nexus One, G1, Droid, Eris, others)"][/caption] Isn’t it adorable! Features View current Disc and Instant queues Search Netflix catalog and Add new movies to Instant and DVD Queues Re-order or delete existing movies View movie details (Year, rating, Synopsis, etc) Hot Announcement!
October 24, 2009

Performance Tip: Boost Your SAX Life

SAX, or Simple API for XML has grown to be the standard in Java XML parsing. Numerous studies show how its performance, in the majority of circumstances, beats others such as PULL. Does that mean you should just bang out a custom handler and expect solid performance, hardly. This article has only two tips, but it can have a huge impact. Sample Code In case it has been a while since you wrote your last SAX XML handler, below is a sample method for the start of each element in an XML stream.
October 16, 2009

Multiple SSL Domains on Apache without Unique IPs

So you host 13 domains on one server and want SSL certs for each domain. The cost of unique IPs is an obstacle indeed, but what if you didn’t need any unique IP addresses? IMpossible you say? Not with the release of Apache 2.2.13! I stumbled on this nice little feature called SNI (or Server Name Indication) that allows multiple domains to share an IP and implement SSL without showing warnings to users or confusing Apache.
September 1, 2009

Automatically subscribe users to DreamHost announce lists

This is a response to a question on the DreamHost wiki posted by anonymous. “I have a Contact page using form mail, and want to include a checkbox that enable visitors, to also subscribe to our Announce List when posting their form mail. Is there a facility for adding users to the Announce List without using form POST” Without using POST? I am not sure about that.. but using a checkbox to subscribe users is a snap.
August 19, 2009

Running with Rails on Dreamhost

A quick and dirty tutorial to get a new Ruby on Rails application running on your [DreamHost](http://www.dreamhost.com/r.cgi?488244/hosting.html|EDDIESAVES “Save $50 off the yearly cost of hosting with Promo Code “EDDIESAVES”") server. In am going to concentrate on the easiest method, which is to use the Phusion Passenger module, a.k.a. ‘mod_rails’. Introduction Some wise warnings from the DreamHost Passenger Wiki page; “Passenger and Mongrel fulfill very much the same roles so you most likely do NOT want to be using both of them on the same domain or website.
August 5, 2009

The perks and pains of Google Voice - A First Look

As an avid Beta tester I must admit that the excitement of receiving that new product invitation email never dulls. That is very true for the email I received earlier this week inviting me to Google Voice. The service is particularly sweet for any Android users that are already syncing their Google contacts with their phone. Google Voice can see these contacts as well and label all your incoming calls. The Google Voice interface looks very much like gmail.
July 18, 2009

Getting the most of cell phone favorites - a.k.a. free calls

Many cell phone carriers are moving to implement a circle of friends that you can call for free. T-Mobile has MyFaves™, Alltel has My Circle ™, even Verizon offers a discount on the ten numbers you call most. This begs the question; “Who do I call Most?” Well you can be subjective about it and decide you like Danny better than Mary-Lou, but the truth is that Mary-Lou calls you constantly, and that’s going to put a dent in your anytime minutes.
July 12, 2009

Keep your inbox clean with email aliases

More and more sites require you to verify an account by receiving an email.. fair enough. But then 2 months later you start getting the newsletters and updates that you no longer care about. Enter Gmail ! To be honest, other mail servers may do the same, it may be standard, but I have not seen it used outside of gmail domains. Anyway, I digress. The Alias ability in Gmail lets you create a unique address for a site(s) and then set filters on those addresses, my favorite being send to trash.
July 5, 2009

Make Custom Ringtones on T-MObile's G1 Free

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? Open Source Android OS 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?
June 6, 2009

Using passwordless login on PuTTY and Cygwin using Keys over SSH and SCP

Get Started - Installing the Tools Cygwin PuTTY WinSCP Generating our Keys Disseminate our Public Key The Dissemination Scripts Script 1 - Called Locally Script 2 - Called remotely - Name important (addPublicKeyRemotely.sh) Testing Cygwin Importing to PuTTY Repetitive Entry Avoidance (A.K.A. Enter the passphrase once, and only once) Using Pageant Using SSH-Agent for Cygwin Conclusion Tools like PuTTY and Cygwin allows users trapped in a window’s world to retain some of the power and functionality of ‘nix platforms.
May 10, 2009

Oracle SQL: Use sysdate for start and end of previous month and year

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!
March 30, 2009

Nested trees in CakePHP

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.
March 24, 2009

Getting Started with ACL in CakePHP

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. What is ACL? ACL, or Access Control List is a common means to control access to applications or sites at a granular level.
March 24, 2009

Drop all tables from a MySQL Database without deletion

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.
February 13, 2009

Simple shell script to backup multiple mysql databases

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. ** ANother Update! - better error handling.
February 12, 2009

Validating Optional Fields in CakePHP - The dreaded OR scenario

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.
February 12, 2009

Logical Bot Check in CakePHP not CAPTCHA

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.
February 7, 2009

Global Site Settings Component for CakePHP

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. The Problem Letting your client edit site_details.php just to change the site’s tagline ends up in 500 errors or the like.
February 7, 2009

Scope Issue in Bash While Loops

I was writing a pretty complex Log Recylcer script that handles rotation, purging and compression. I wanted to print a nice summary at the end with all the counts. I got incredibly frustrated when a simple variable increment seemed to have scope issue.** I can only re-create the issue using a pipe and read**. Background For those of you familiar with Bash you know that a variable declared inside an if statement or loop can usually be accessed outside that block without issue.
February 7, 2009

Using Piwik to Analyze visits on a CakePHP site

This is another article based on current search terms for my site. A good number of searches for “piwik + cakephp” are landing on various pages of my site. So if your one of those folks I’ll assume you want to use Piwik Analytics in your CakePHP site. Well your in luck, the solution is nice and easy. CakePHp provides some nice variables that we can use for detailed page tracking.
January 28, 2009

Add an RSS Feed to your CakePHP Models

I recently developed a prototype for a client who insisted that the site include an RSS feed for the articles of the site. Not being one to turn down a challenge, and being aware of the Power of Cake, I assured them it could be completed with such a feature. The newsfeed would provide the latest articles to be consumed by an aggregation software or other feed reader. So in the text that follows I’ll outline what is involved to add news feed or rss feeds to a particular model of your CakePHP site.
January 28, 2009

Simple Feedburner Ticker with PHP

Feedburner provides a simple Ticker applet for display in your pages and elsewhere. This always worked fine for me until I transferred my feed to Google. Now I love what Google is doing, like free-ifying all of the Pro services, but I really depended on that simple ticker to know where my feed stood. If you found that the Feedburner ticker is no longer working for you (make sure you add your feed’s uri to the end), I offer my solution as a replacement.
January 26, 2009

Create nested trees that expand and collapse in CakePHP

This is a horrible tittle, and I apologize. What I mean is that we can show nested items based on parent-child relationships that will expand and collapse with a simple, click. The trick requires prototype and scriptalicious. The reason is ease of use and aesthetics. If a user lands on a page, let’s say ‘Categories’ and sees all the categories sprawled out across the page they’ll retreat in horror. [caption id=“attachment_333” align=“aligncenter” width=“150” caption=“Defaulting to expanded trees is overwhelming to visitors”][/caption] Instead it would be much nicer to only show the top-most categories, and let them dive down where necessary.
January 24, 2009

Log Recycler Script

So when I wrote the article that introduced a script to generate mysql backup files for multiple databases I mentioned the trouble that will occur if you don’t get a handle on some means to retire old files. This applies to log files, mysql backups, or just about any other type of file that is created on a recurring basis. You don’t need a error log from 134 days ago, but error logs for the past week could be very useful.
January 18, 2009

Transferring files between hosting providers

I recently upgraded my hosting provider to DreamHost on the advice of a co-worker. The reasons for the move are many, but the topic of this article is how I am to move the hundreds of files I host from one server to the other. The problem I knew there was no way I am going to torment myself by compressing, downloading, uploading and un-compressing the files. So what other options did I have?
January 8, 2009

Prevent Image use by outside sites

Hotlinking… one of the most dastardly crimes to hit the internet. This is especially concerning if your hosting plan caps your bandwidth. Hotlinking is when users insert a url to your images on their own site rather than linking to your page (or just uploading the image to their own servers) What is a simple webmaster like yourself to do with these hooligans that are chewing away at your bandwidth allocations?
January 2, 2009

Forcing Visits to use SSL

Intro Doesn’t matter whether it’s a CakePHP app for a client, your own personal CMS, or any other web based application. If your passing around passwords or other sensitive info you should really implement SSL. SSL provides 2 main perks to your visitors. First it encrypts all communication that flies across the web. This prevents curious or devious billies from getting your secrets. Secondly it ensures to the user that your server is in fact who it claims, and not a nasty ‘man in the middle" attack.
January 1, 2009

Escaping IBM Rational Products: Simple Java EE Web Application Development with Eclipse

If you work for a large enterprise you undoubtedly know the “features” of typical IBM Rational products. And if you work at a really large enterprise you likely have little freedom for deployments environments beyond Websphere. But that’s OK! For the first post in our cross-blog series “Escaping IBM Rational Products” we look at alternatives to IBM’s Rational Application Developer - keeping in mind that the result must be a file that can be easily deployed to a Websphere server once ready for production.
November 30, 2008

Complex Validation in CakePHP 1.2

With version 1.2 we got a much more powerful validation feature. I think that many people migrating from version 1.1 may not realize how much it offers. I offer a simple Users model. It has fields like username, password and email that require special and perhaps multiple validation rules. Here’s how we’ll get tricky; Username must be atleast X characters without spaces, Username must of course, Be unique! Email must be valid email and Unique Password must be confirmed during registration or renewal process That is to say compared.
November 18, 2008

Redirecting users to a Site-Down message

When making changes to your backend or user interface, it is nice to let users know just what is going on. Changing out your index page will only work for users who go to your main pages. In order to effectively block all pages, and redirect to a proper message, I recommend using apache’s .htaccess. The best part about this feature is you can still allow your development team to access the site while blocking everyone else.
October 29, 2008

Reset Lost Passwords in CakePHP

Allowing users to create passwords is critical. But what happens when they want to change their password, or worse yet a user forgets their password. Will they be forever banned, unable to remember that hastily typed string?! Allowing users to send password reset tickets to their original email is a pretty good way to solve this, and is seen throughout the web. Its a snap in CakePHP as well. Here’s how it works.
October 23, 2008

Validating Complex Passwords

There are many variations of a ‘complex password’ but most focus on having a minimum number of characters and must include at least 1 number. Others take it further and require upper case characters, or special characters (&-_!, etc). I will show you code to do all three. The basic concept ruses a regular expression. My examples will use php to compare the text to the regualr expression, but all major languages has some method to evaluate regular expressions, or regex.
October 23, 2008

Multiple Sites in Piwik

So I was checking my analytics (piwik of course ;-) ) today and I noticed a lot of folks landing on my page after searching this title, ‘multiple sites piwik’. Unfortunately they were landing on a page that only briefly discussed that it was a capability of piwik, so I felt alot of users were leaving with a bad taste in their mouths. To make amends Ill do my best to sum up this easy process.
October 22, 2008

Create Subdomains with Apache - The Easy Way

This will walk through the process of adding sub domains to your local server ( onesite.localhost , twosite.localhost, etc ). To understand this need you are liekly working on multiple sites at once on your local development machine. So lets say you have an excellent CakePHP application, a gnarly JS sandbox, and your personal start page all belonging to different directories. Problem is, there is only one localhost. But just like your live server can have subdomains, you can skip DNS and use virtualhosts in Apache do the work.
October 10, 2008

Simple Email Component for CakePHP

Background I have read many forum and mailing list posts that discuss troubles implementing an email component for Cake. To be honest I never tried to source a third-party component, and just decided to build my own using PHP’s mail function. NOTE: If you send batch emails accounting for hundreds our thousands messages, this would not be your best option. If you just want to notify admin or users about particular events, like welcome messages or lost password tickets, then this will suit you just fine.
September 28, 2008

Heavy duty password validation in CakePHP

When validating passwords for new users or changing passwords for existent users there are three main concerns. You want passwords to match You want passwords to be ‘strong’ (meaning complex) You want to store the passwords under some encryption *Strong in this case means a minimum of 8 characters with no whitespace. It must contain upper case and lower case letters, and at least 1 digit or special character.
August 5, 2008

Open source project Piwik puts Google Analytics on notice

Ok, well I’m not sure if anyone at Piwik has publicly directed the comment towards the internet giant Google. The group behind the open source visitor tracking and analytic software however openly contends “piwik aims to be an open source alternative to Google Analytics.” And what a job they’ve done! Though the software is still in a beta phase, its features are impressive, the interface is smooth, and the graphing is truly beautiful.
July 31, 2008

Serving up Files from a database in CakePHP

This article is mostly in response to Daniel Hofstetter’s great article, File Upload with CakePHP which explains how to save uploaded files in their own database table. In his example (I assume for the sake of space and time in the article) he serves the files right from his controller. This is not true to the MVC format however, so I wanted to provide an alternative for those who were unsure how to separate the two.
July 27, 2008

Disable entire page and show translucent progress window

Ever uploaded an image or iniated another timeful(slow) process on a webpage? Some sites appear to fade out the whole window while a small loading bar appears. [caption id=“attachment_62” align=“aligncenter” width=“300” caption=“Loading Bar translucent overlay”][/caption] This not only clearly indicates to users that the server is working in the background, but it is a great way to block the impatient click happy users as well. Its a pretty straightforward effect done with javascript and css.
July 24, 2008

Renaming CakePHP template file extensions for 1.2

A good many people have hit the CakePHP group asking what needs to be done to upgrade from 1.1. to 1.2. I imagine the most painful changes are the loss of $html helper calls in the views, and $this->generateList calls in controllers. $form helper will handle all the deprecated html calls, and $this->Model->find(‘list’); will handle select boxes. Of course most people notice immediately that templates and layouts no longer use .
July 22, 2008

Generating dynamic sitemaps with CakePHP 1.2

Sitemaps are although not critical, have been accepted as a standard way to let engines and users find the content on your site. You can generate those sitemaps on the fly in Cake, and show xml to engines, and formatted text to users. Sitemaps that are generated dynamically are always up to date, which is critical in achieving those top search results. How you may ask? Read on and I shall tell you.
July 20, 2008

Using Clickheat with CakePHP

The Clickheat software, rocks. Personally I use the plugin for phpMyVisites, but I could understand anyone adopting the standalone package too. CakePHP layouts can be setup to automatically print the most sensible url in each page it loads. This concept will work with any visitor tracking software that has a page or url attribute that is manually assigned. To learn how and see the code, continue reading. In /views/layouts/default.ctp; params; if(empty($params[‘url’][‘url’])) { //we need to concat our own url $pageWeSee=$params[‘controller’]; //only append action if not ‘info’ pages (‘index’ is hidden in url, and should be hidden here) if($pageWeSee!
July 17, 2008

Using ClickHeat plugin for phpMyVisites

The newest version of phpMyVisites comes with an awesome ClickHeat plugin. Trouble is they have 0 documentation on how to implement the plugin. Below are those details as I discovered the process. Enjoy For all the details in a step by step manner, read on. To make this easy to understand, there are 4 main parts: Activating the Plugin Configuring the Plugin Inserting the JavaScript / Debugging Javascript VIewing the Results
July 11, 2008

Automatically choose database connections in CakePHP

When developing applications it is wise to isolate development environments from live production environments. This is true of your code and your database structures For me this means my local SuSE server runs any developmental code before I push it off to a shared hosting account out on the real live web. The frustrating part for me was changing between two distinct database connections. Every time I uploaded the complete application I would need to manually change connection strings.
July 5, 2008

The GreenLife List goes Alpha!

That’s right! I have decided to publicize The GreenLife List on a small basis in order to gain critical user feedback. I hope you’ll visit The GreenLife List, register an account, add some products and generally test-drive the site. I also hope you’ll follow up that visit by dropping us a note on the contact page, or passing along your results here as a comment. The site provides us (consumers) with a quick and easy way to evaluate products and the companies producing them.
June 17, 2008

Small scripts and achievements

Small Amusings These are some small choirs I have built simple to moderate scripts to handle. Many of this is now found in classes in just about every language, relics if you will. Stand Alone Java Programs Song Indexer Small Java program recursively runs through your music folder printing all songs in an ordered and grouped xml file. Included xsl sheet gives it a nice look. Excel To XML Java program builds xml files based on data from excel spreadsheets.
June 16, 2008

Using CakePHP Pagination with HABTM tables.

This works with CakePHP Version 1.1 Only ! Version 1.2 has paginate component built in. So I love using the Pagination Helper and Pagination Components because they are so sweet and so easy. The trouble I hit was in HABTM relationships. An example is product categories. A product like Apple may belong to many categories like Fruits and Food. The category Food may have several products, such as Apples, Pizzas and Burgers.
May 21, 2008

Using Pagination and HABTM relationships in CakePHP 1.1

So I love using the Pagination Helper and Pagination Components because they are so sweet and so easy. The trouble I hit was in HABTM relationships. An example is products and categories. A product like Apple can belong to Fruits and Food. And of course Food can have more products than just Apple, like Pizza and Burgers. So if our users view a Category page like ‘Fruits’ then we shouldn’t show them pizza or burgers.
May 21, 2008

Graphing in PHP

Recently I have been attempting to build graphs in PHP. I was shocked by the lack of Object-Oriented classes to handle this. It just seems that dynamic graphing is a pretty common need, yet not much in the way of open source solutions. I have settled for a nifty flash solution called Open Fash Chart . The animations are smooth and will work, I just dislike loading sites with cumbersome applets that require plugins.
May 21, 2008

Assign Custom Object Identities with JPA

JPA provides the ability to assign primary keys automatically out of the box. Unfortunately the only strategies JPA provides rely on the database, or sequence tables to manage ids. But if you want to assign your own ids from a id service, or cycles of the moon it can be done. Any possible way you can think of to get a unique ID, you can use with JPA. This article introduces a custom jpa sequence generator for JPA.
November 30, 2001

Adventure Riding

Inspired by co-worker and fellow ADV rider’s blog, I’ve decided to start blogging about some rides or activites I’m found of.
January 1, 0001

Adventure Riding

Inspired by co-worker and fellow ADV rider’s blog, I’ve decided to start blogging about some rides or activites I’m found of.

Moto Camping the Adirondacks

August 6, 2021

I’ve finally tapped my brother to join me for a off-road motorcycle camping adventure.

Kushaqua Mud Pond -- Finally (sorta)

July 5, 2020

PLANNED RIDE: Here’s the plan, re-visit CR-26 (full tank of gas this time!) and then turn southwest down Kushaqua-Mud Pond road down into Onchiota before returning eastward.

I finally did it! - New Tires

June 20, 2020

This is long overdue for me. I’ve been eyeing some nice 50/50 tires since I got this bike several years ago. I’ve had Mitas E-07 set sitting in my garage for 3 months. This weekend I finally swapped in my new tires, and dit it myself!

Running on empty - Loon Lake Loop

June 2, 2020

How far will your car go on “E”?

Once the little light pops on you know there’s a good bit left to get you to a fill-up at the nearest station. And I’ve pushed my car knowing that. A bit of googling says depending on make & model, most cars will get 30-50 miles.

But when the indicator light came on my bike this weekend I knew my little tank would not be so generous… or would it?

Thrall Dam and Tracy Rd

May 25, 2020

My buddy who’s been talking about “getting a big ol chopper” since he was 12 finally got himself a harley 20 years later. It’s his first bike, so we went for an easy ride a few weeks back.

When we were sitting outside after (socially distanced of course!) his neighbor joined our convo from the balcony. He asked if I liked Tracy rd. He wasn’t a rider, but he had heard from a group of his coworkers I guess.

Anyhow, apparently a well known and loved road, Tracy is a tight twisty ride with potholes that want to throw you out of your seat.

Chazy Chateaugay Chute

August 6, 2019

This was a random route planned by Calimoto, it took me past 2 gorgeous lakes, Chazy and Chateaugay. The views were epic, both waterside and hilltop, unfortunately I was focused on the ride and didnt get many pictures.

Nifty tech tag lists from Wouter Beeftink | Page content generated from commit: 9281021