I came across this great REGEX calculator
I came across this great REGEX calculator
floor and time - calculate number of days elapsed from timestamp
/* web convert date to unix_timestamp: www.4webhelp.net/us/timestamp.php */
One can create their own unix_timestamp converter using mktime() function.
// subtract old timestamp
$t_sec = time() - 1102971600;
/*
divide #seconds by 60 for minutes
divide #of minutes by 60 for hours
divide #of hours by 24 for days
use floor to get integer for day
*/
$t_day = floor(($t_sec / 60) / 60 / 24);
Brent Ashley explains what Ajax is
AJAX is an acronym for Asynchronous JAvascript XML. Ok, now that I’ve told you that, forget you ever heard it. Ajax (proper case) has already come to represent a wider concept. The concept is this: Load up and render a webpage, then remain at that page while scripted routines make background trips to the server for data that is used to update the page in place by re-rendering and or hiding/unhiding portions of the page.
Today’s LIVE show - Show #231 - Friday Mar 25, 2005:
NOTE: As of last week, Script School radio now runs 75 minutes and Webmaster Cookbook runs 45 minutes, which still makes it the two hours of tech radio show. We’re trying to reduce the podcasting time, as it seems shorter is generally more preferred in the podsphere and also 60 minutes just wasn’t quite enough time for Script School radio.
On last week’s show we discussed a design for a simple database to track the music ratings. This week we’ll put the database in beta use and discuss how to INSERT rows of data into the database. Also on the show:
- free hosting for audio, video files — even for adult — is it too good to be true?
- Yahoo adds search and API support for Creative Commons Licensed content plus plans to bump up email to 1GB in April
- Sony PSP released and reviewed
- a guest appearance on WebTalkRadio: podcasting finances, bad blogger habits, Google news saturation and more
- search the PHP manual easily via the free MakeYouGoHmm toolbar
- how to share your books with the world, and track where they’ve been
- Mac segment: using the Mac as a timeshift radio recorder
The 231st two hour of tech radio show starts at Script School 2pm PST / 5pm EST / 10pm GMT and your attendence and opinion is welcome and encouraged:
http://www.scriptschool.com/radio/ <– radio show feeds (look for the 24k and 56k links)
http://www.scriptschool.com/commons/ <– java chat
irc.scriptschool.com #scriptschool port 6667
Toll Free caller line (US and Canada): (800) 634-2718
Skype line: TDavid
## Hour #2: — Mainstream “Safe for work” –
(via webmastercookbook.com — LIVE commercial free, no carbs education) show #31 ###
A reality-based family-friendly webmaster e-learning show. Follow along as a Jowl learns webmastering and specifically how to create his very first website, step-by-step.
Drinks (cool stuff like RIAA-free music, free scripts, affiliate programs, websites, and more):
- Jybe plugin for IE and Firefox
Appetizers (hungry for knowledge, this will get you started)
- Skype experiment take two — same building with Skype connection and Jybe
Main Course (the meat and potatoes of the show)
- How to get the old design back for Webmaster Cookbook
Dessert (fun and fat-free stuff)
- PSP reviews for Darkstalkers, Tony Hawk Underground Remix and Lumines
The Check (what did we learn today)
- Take the weekly quiz along with Jowl — what was learned today?
Note: this is the lineup for last week’s show below for reference purposes. The current show usually appears on the radio show page by noon (PST) on Friday (show day).
We’ll be posting the lineup for today’s show: Friday March 25, 2005 in a little while.
Show #230 - Friday Mar 18, 2005: The official 2 hours of Tech Lineup (to be posted on/by 3/18/05)
Today we’ll be discussing the steps required for implementing your own A9 search results column with a Wordpress 1.5 blog. We’ll also try to reach Forser again to see if we have better Skype connectivity and to discuss database design.
- Forbes puts buy signal on four internet stocks
- importing from Pivot to Wordpress: steps to consider
- Google gets open source friendly with code.google.com
- Yahoo to launch blogging + social networking tool on March 29
- the default checked controversy
- Mac segment: more mini-mac!
The 230th two hour of tech radio show starts at Script School 2pm PST / 5pm EST / 10pm GMT and your attendence and opinion is welcome and encouraged:
http://www.scriptschool.com/radio/ <– radio show feeds (look for the 24k and 56k links)
http://www.scriptschool.com/commons/ <– java chat
irc.scriptschool.com #scriptschool port 6667
Toll Free caller line (US and Canada): (800) 634-2718
Skype line: TDavid
## Hour #2: — Mainstream “Safe for work” –
(via webmastercookbook.com — LIVE commercial free, no carbs education) show #30 ###
A reality-based family-friendly webmaster e-learning show. Follow along as a Jowl learns webmastering and specifically how to create his very first website, step-by-step.
Drinks (cool stuff like RIAA-free music, free scripts, affiliate programs, websites, and more):
- A9 column search
Appetizers (hungry for knowledge, this will get you started)
- Fixing Webmaster Cookbook after the upgrade
Main Course (the meat and potatoes of the show)
- daily content updating progress checking
Dessert (fun and fat-free stuff)
- Jowl struck by pac-man fever
The Check (what did we learn today)
- Take the weekly quiz along with Jowl — what was learned today?
Example.
// redirects a user to scriptschool.com
header(”Location: http://www.scriptschool.com/”);
Also see PHP course I, week #8.
10 tips for speeding up web page loading
Just submitted an article with 10 tips for speeding up webpages to Cyberwurx:
This is an impatient net society as netizens crave more bandwidth. It seems logical to think that the hosting company are the primary people to contact when pages load slowly, but there are actually a lot of things that we, as webmasters, can do first and foremost to make sure that our web pages load faster before contacting the hosting company. Sometimes very small changes we make with our habits as webmasters can make huge impacts in the speed of which our web pages load particularly in the content of the pages, the compression and third party programs being accessed/used. Today I’m going to detail some specific items below that will help speed up web pages…
Everything from writing your own HTML, optimizing images all the way to the more advanced concepts of employing caching is discussed.
Happy coding to you!
Starting and stopping the MySQL server
Ever been traversing the web and see something like this:
Warning: mysql_connect(): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2) in /home/ourmedia/htdocs/includes/database.mysql.inc on line 31
Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)
This usually means the MySQL database server is not running and needs to be restarted. How to fix via SSH/telnet so that when the machine reboots, it automatically starts MySQL?
E-gineer provides step-by-step instructions for setting this up on a Red Hat box. They also have general startup instructions here.
Craigslist job: WordPress Wizard Task
In addition to code snippets, from time to time I’m going to post jobs/projects that I come across as well. Check out this one from Craig’s List - WordPress Wizard Task:
Task is to
-convert a webpage into a WordPress 1.5 Blog
-relocate the web page at a new host
-provide simple procedure to publish webpagePlease request details and provide quote via email Payment via PayPal or bank transfer
A little earlier I posted on MakeYouGoHmm but you can see below that we’re going to start
adding Code snippets to be added to Script School News:
From time to time myself, and a few other folks are going to start posting small code snippets to serve as real world examples of how to use built-in functions, variables, arrays, DB connectivity, etc in PHP and other scripting languages at the Script School News blog.
I’m excited about using this to help sharing. If you’d like to get involved and share your own original snippets demoing small uses of functions for various coding languages and databases, then please drop me an email at principal at scriptschool.com and I’ll get you an author account.
Here’s a few snippets for Wordpress 1.5 to grab the post ID and post_date inside The Loop:
$post_id = $post->ID; // returns ‘13′
$post_date = $post->post_date; // returns ‘2005-03-18 12:13′