Want to add Coronavirus data to your website? It’s simple with PHP and JSON. There are numerous resources available to pull data from. For this example I will utilize the COVID Tracking Project API. API Data Visit the COVID Tracking Projects API page and find your State from the “States …
Adding Dark Mode to Your Website With CSS and jQuery
Dark mode is all the rage these days. With Apple adding Dark Mode to the upcoming iOS (13) I see this trend increasing in its popularity. The current Mac OS (Mojave) and current Windows OS (10) support Dark Mode themes. Several web browsers are supporting Dark Mode detection when using …
Create Website Favorite Icon and Apple Touch Icons with ImageMagick
I love ImageMagick! ImageMagick makes common image manipulation simple and fast without the need to use an image program like Photoshop etc. As a web developer I often need to create favorite icons along with apple-touch-icons. The following example will demonstrate how to convert your image into the appropriate formats …
Create Rectangular Thumbnail with Automator Workflow Using ImageMagic
I often create thumbnails for images to be posted on various webpages. Instead of using Photoshop or some other image editor I wrote a simple Automator workflow to convert an image to a nice little thumbnail with ImageMagic. Note: I prefer my thumbnails to be 150×100 pixels. You can adjust …
Convert Image for Web With Automator Workflow Using ImageMagic
I have a website where I always upload image files with a standard image size, quality level and unsharp. Instead of loading Photoshop or another image editor I wrote a simple Automator workflow to convert the file with my specified parameters using ImageMagic. Requirements: Automator, ImageMagic Workflow Breakdown Ask for …
PHP Form Select with Date Range
Create a form select with a range of years automatically with PHP. [php] <select> <?php foreach(range(2008, (int)date("Y")) as $year) { echo "\t<option value=’".$year."’>".$year."</option>\n"; } ?> </select> [/php] The above code will output the following: <select> <option value=’2008′>2008</option> <option value=’2009′>2009</option> <option value=’2010′>2010</option> <option value=’2011′>2011</option> <option value=’2012′>2012</option> <option value=’2013′>2013</option> <option value=’2014′>2014</option> <option …
Use Apple’s Preview App to Create an Icon (Even Windows Icons)
Preview is an amazing tool! I would say I probably use Preview at least twenty times a day. Today I learned that Preview can even create Windows Icon files (and Mac icons of course). Amazing; simply amazing. Once you have an image that you would like to convert to an …
Load jQuery from CDN with Local Fallback
It’s best to load jQuery from a reliable CDN (like Google) for your code. Sometimes (rarely) the CDN you are pulling from may be down or possibly blocked by your web provider. You can add local link to insure your scripts properly function. Simple!
PHP Convert Time from/to 12 Hour or 24 Hour
Simple way to convert time with PHP’s date and strtotime.
Show/Hide DIV With Checkbox Select
The following code will enable you to display a DIV with text when a checkbox is selected. HTML jQuery View/Test on jsFiddle
Create RSS Feed From Facebook Page
I use RSS feeds frequently for my work. Some companies and organizations have turned to their Facebook Pages for posting current news and have abandoned traditional RSS. I have found a nice way to create RSS feeds for those Facebook Pages so I don’t have to be on Facebook all day …
Creative Cloud Update Error A12E1 – Automated Fixer
After having to manually fix the A12E1 Adobe Cloud Update issue for the umpteenth time I figured I would put together a little Automator Workflow to do the magic for me automatically. If you are a Mac user and you randomly get hit with the “We’ve encountered the following issues: …
Awesome Visual Crontab Editor
I don’t regularly create cronjobs; however when I do I can never remember the proper crontab syntax. Each time I want to edit my crontab I have to fire up my codebox for reference. For some reason its the minutes and hours that screw me every time. The trusty old …
Populate a DIV from a Form Select with jQuery
Have you ever wanted to populate a div with some specified text based on a form select. Below is my super simple solution. First you will need to add a select into your form and create the div where you want your specified text displayed. The HTML [html] <select name="mySelect" …
Free jQuery UI Themes Collection
jQuery UI, the official user interface components library of jQuery, offers a lot for quickly implementing widely-used widgets and features into websites. It consists of the popular datepicker, slider, accordion, progress bar, drag ‘n’ drop and much more. And, it is themable, there is even ThemeRoller which allows anyone to customize …
Create an Error Page to Handle all HTTP Errors with PHP
From the land of “why the hell didn’t I think of this sooner”… The following is a drop dead simple method to handling all HTTP error (403, 404, 500 etc.) pages with one single PHP file and a few tweaks to your htaccess. .htaccess Code The first step is to …
Stop SOPA/PIPA (PROTECT-IP)
Congress is about to pass internet censorship, even though the vast majority of Americans are opposed. We need to kill the bill – PIPA in the Senate and SOPA in the House – to protect our rights to free speech, privacy, and prosperity. YES – These bills WILL affect how …
Automatically Update Your Copyright Notice Date
Every year some lonely web folks are wasting time updating the copyright dates on their various websites footers. Since we have jumped head first into 2012 lets start the year off right. The following will show you how to use PHP to automatically update your notice. Display Current Year [php] …
Business Days To/Fro with PHP
The below example will help you with finding or setting a date to and/or fro using business days only. I needed this for a project I was working on and thought I would share. [php] <?php function dateFromBusinessDays($days, $dateTime=null) { $dateTime = is_null($dateTime) ? time() : $dateTime; $_day = 0; …
Super Simple Page Cache with PHP
Here is a super simple way serve up a cached version of your HTML. [php] <?php // define the path and name of cached file $cachefile = ‘cached-files/’.date(‘M-d-Y’).’.php’; // define how long we want to keep the file in seconds. I set mine to 5 hours. $cachetime = 18000; // …
H.264 Standardization, The Final Nail In Flash’s Coffin
The big news announcement of the day is that MPEG LA, license holder for a number of high profile video standards has declared all h.264 video will be royalty free, so long as the video is provided to the end user for free. The technical implications of this are lengthy, …
CSSEdit – Cascading Style Sheets with a Dash of Love
I have been hand-jamming and/or utilizing DreamWeavers CSS tools for so long I never stopped to look outside the box. I honestly don’t know how or where I came across MacRabbit’s CSSEdit app, but I wish I had stumbled across it a long time ago. CSSEdit is nicely designed and …
PHP Snippets – The Name Says it All
I’ve been following a new website via Twitter. PHP Snippets (www.phpsnippets.info) posts frequent useful PHP code samples. PHP Snippets is maintained by Jean-Baptiste Jung, author of Cats Who Code and WPRecipes. PHP Snippets is a great place to find clean code samples to get you started on your project. I …
Domain Names Gone Wrong!
The below domains are registered to legitimate companies, who didn’t spend quite enough time considering how their online name might appear! ‘Who Represents’ is where you can find the name of the agent that represents any celebrity. Their Web site is: www.whorepresents.com ‘Experts Exchange’ is a knowledge base where programmers …
Dropbox Tips & Tricks – My Top 5
I love Dropbox; it’s simply amazing and über helpful. Appstorm has published several posts with some really useful Dropbox tips. Below are the five tips and ticks I can’t live without. Tips & Tricks If you’re not familiar with Dropbox, let me first start out by saying you’ve been missing …
- Page 1 of 2
- 1
- 2