Mac OSX: Resize Image on Right Click
I resize a lot of images to the same size for use in my blog and on my web site. This automator script allows you to quickly resize and image from the right click menu.
[ Leave a Comment ]
I resize a lot of images to the same size for use in my blog and on my web site. This automator script allows you to quickly resize and image from the right click menu.
[ Leave a Comment ]
It's been almost a year since I switched to using a Mac from a PC. Since then there have been a number of other converts. Our entire household now uses Mac computers and I know other people who are switching as well. I wanted to list out some of the software that I've found helpful over the past year. Note that this is mostly from the perspective of a web devleoper
There are a lot of other programs that I use that are more well known, but these form the foundation of smaller apps that make computing on the mac even easier.
[ Leave a Comment ]
Tracking 404 pages is a part of being a web master. I was using a service called Link Patch, but they recently shut down. Why this never occurred to me before I don't know, but I thought, why not just track 404s as an Event in Google analytics. I tried it and it worked like a charm.
Here is the code I placed on my 404 page:
<script type="text/javascript"> // log 404 in google analytics _gaq.push(['_trackEvent', 'Error', '404', '<?php echo $_SERVER['REQUEST_URI']; ?>']); </script>
This will place the url for the page in the events menu under the "Error" category
What I love about this approach is that:
I think this is going to be a great shift. I just sorry I didn't set it up earlier!
[ Leave a Comment ]
I’m currently working on a project where I wanted to use DOMPDF to export html from magento. With some help from some folks who got DOMPDF to work with Zend I was able to get it working with Magneto.
Step 1
Copy the dompdf folder to the lib directory of your magento install.
Step 2
Edit app/Mage.php to include the following code
include_once 'dompdf/dompdf_config.inc.php'; spl_autoload_register('DOMPDF_autoload');
This goes around line 52 inside the else statement right after
include_once "Varien/Autoload.php";
Step 3
Use the code. Here’s an example of what I am doing inside on of my custom contollers
public function printAction(){ if ($quote = $this->_iniQuote()) { $html = $this->getLayout()->createBlock('crm/quotes_print')->toHtml(); $dompdf = new DOMPDF(); $dompdf->load_html($html); $dompdf->render(); $dompdf->stream("sample.pdf"); } }
Basically that’s it. Pretty straight forward and seems to work like a charm.
NOTE: This was done using DOMPDF 0.6.0 beta1 and Magneto 1.4.0.1
[ Leave a Comment ]
I hope this attempted transition to MAC doesn’t end in tragedy, but it looks like its heading that way fast…
Yes there are some things I like, but I’m afraid that this list is only going to continue to grow.
[ Leave a Comment ]
On my company blog I posted a complete step by step processes with videos of a standing desk that I built. As a programmer I do a lot of sitting and the standing desk is a great way to get out of the seat and be productive. Learn more about this project: Simplified Building – Standing Desk
[ Leave a Comment ]
I was reading a Read/Write Web article and YQL and started to monkey around with it a bit today. I was in need of an script that returned information on the users location based upon their IP. In a few minutes I was able to pull together a quick script to start parsing out information based on a user’s IP. Nothing fancy here, but it works! There are some limits to how many times you can query YQL (read the documentation for more information).
$ip = $_SERVER['REMOTE_ADDR']; $url = "http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20ip.location%20where%20ip%3D'{$ip}'&format=xml&env=http%3A%2F%2Fdatatables.org%2Falltables.env"; $xml = simplexml_load_file($url, 'SimpleXMLElement', LIBXML_NOCDATA); // if you need to see what is coming back.. uncomment below. // print_r($xml); // store the information you want using xpath
$country = $xml->xpath("/query/results/Response/CountryCode");
$city = $xml->xpath("/query/results/Response/City");
$lat = $xml->xpath("/query/results/Response/Latitude");
$long = $xml->xpath("/query/results/Response/Longitude");
echo "<p>" . $country[0];
echo "<p>" . $city[0];
echo "<p>" . $lat[0];
echo "<p>" . $long[0];
[ Leave a Comment ]
An extension that showed custom fields in the edit had already been developed and was readily available on the EE forums. However, I needed to mod this extension a bit to be based on field label instead of field id. Functionally this allowed me to grab custom fields in different custom field sets and display them in the same column. The use case for this was as follows. I had multiple custom field sets, the user was entering the title in German and I wanted to be able to see a title in english. So I added a field to each custom field set with the same label “english_title”. I used that to pull the English title in the edit tab (so if I needed to find something I could, see as I don’t speak German).
Download: ext.edit_custom_field_by_label.zip
To use the extension, install the files in their standard locations, enable and then edit the settings (fill in your field with the appropriate field label).
If you have any problems feel free to leave a comment and I’ll help you when I can.
[ Leave a Comment ]
Just about 18 months ago we conceived of a new web site that was focused on safety solutions. As we conducted business on Simplified Building Concepts we saw an increased emphasis on safety railing and safety products. This led us to create an entire site that focused on providing safety solutions and advice. The site was designed in collaborations with Squared Eye. Matthew Smith from Squared Eye did a fantastic job working with me to put together a site that is both beautiful and usable. I highly recommend his services.
I welcome you to visit the site and give feedback (use the black tab on the right side). In the future I plan on releasing some posts on the ins and outs of the architecture of the site.
Here’s a bit of information about the site:
Simplified Safety is a company specializing in safety products and advice. We aim to provide customers with tested, top quality safety gear and the appropriate advice to identify the products that are needed by each individual customer. Working closely with each customer to arrive at a tailored safety solution is how we hope to set ourselves apart in the industry. Here are a few examples of the safety products we supply: Guardrails, Skylight Protection, Lifeline Systems, Personal Protection Equipment, Harnesses, Lanyards, and more.
[ Leave a Comment ]
In software development, you usually think of the next version of a package as containing more features, not less! Especially when you consider such a featured glutted product as Microsoft Office, you don’t just expect things to just “go away". Perhaps you are one of the people who was shocked to see the Routing feature disappear from Excel 2007.
A couple of years back I worked for Roberts Wesleyan College, a higher educational institution that made frequent usage of the routing feature found in Excel. One of their bright developers, Todd Andersen, has developed a plug-in to bring routing capabilities back to Excel 2007.
I invite you to check out his routing plug-in for Excel 2007. He offers it for reasonable price, and knowing Todd’s programming ability, I have no problem recommending it as quality plug-in that will help fix what Microsoft has broken
[ Leave a Comment ]
Next,
Check out some of these blogs.
I have been the primary developer for the sites listed below.
Have you found something helpful? Consider a small donation.
Stay updated on my meandering thoughts & activities via RSS (Syndicate).
Web Developer - proficient in both PHP and ASP.NET.
Rochester, New York
View my web developement site.