Aug 212016

Why do i want to bookmark pages?
The idea behind bookmarking is to save you time. It does just that by saving page addresses for quick access without having to redo your internet search. Remember how long it took you to find that page, and how many junk pages you had to click on to find it? Who wants to do that again? Just bookmark and you’ll never have to search for that again.

What pages should I bookmark?
Bookmark EVERYTHING you think might want to visit again later. Think of it as creating your own encyclopedia or your own search engine that only gives the results you want. The bookmarks folder DOES have a search box you can easily find your bookmarks with.

Organize your bookmarks according to subject matter and you’ll create yourself a nice little encyclopedia of information and resources to quickly find more information.

Oct 092012

The Code

After messing with tons of examples of PHP on an the easiest way to get the start of week’s date, I ended up combining a few examples and adding a bit of my own code.

This Week Starting Monday Date

Get this Mondays timestamp function

function mondayTimestamp($year, $week) {
// According to ISO-8601, January 4th is always in week 1
$halfwayTheWeek = strtotime($year.”0104 +”.($week – 1).” weeks”);
// Subtract days to Monday
$dayOfTheWeek = date(“N”, $halfwayTheWeek);
$daysToSubtract = $dayOfTheWeek – 1;
// Calculate the week’s timestamp
$unixTimestamp = strtotime(“-$daysToSubtract day”, $halfwayTheWeek);
// return the timestamp for Monday
return $unixTimestamp;

We need to pass the year and number of the week to the function.

// get this year
$year = date(“Y”);
// get the number of the week in this year
$week = date(“W”);
// get Mondays Timestamp
$mondaysDate = mondayTimestamp($year, $week);
// format the Date of Monday Starting this Week
$its_monday = date(‘Y-m-d’,$mondaysDate);
// =========== OUTPUT ============
echo “Start of Week: ” . $its_monday;

Last Week Starting Monday

Use the function above to get Mondays timestamp, but pass it a value for last week (W – 1) instead of this week.

// get last weeks number, if week = 1 set last_week to 52 and subtract 1 from the year
if (date(“W”) == 1) {
$last_week = 52;
$year = $year – 1;
} else {
  $last_week = date(“W”)-1;
// format last monday timestamp
$lastMondaysDate = mondayTimestamp($year, $last_week);
// format the Date of Monday Starting Last Week
$last_week_monday = date(‘Y-m-d’,$lastMondaysDate);
// ============== OUTPUT ===================
echo “Start of Last Week: ” . $last_week_monday;

Start of Week: 2018-01-15

Start of Last Week: 2018-01-08

Jul 222012


Change Site & Home URL
wp_options SET option_value = replace(option_value, '', '') WHERE option_name = 'home' OR option_name = 'siteurl';

Reset Password
wp_users SET user_pass = MD5( 'new_password' ) WHERE user_login = 'your-username';

Change URL in Content

UPDATE wp_posts SET post_content = REPLACE (post_content, '', '');
Change GUID
UPDATE wp_posts SET guid = REPLACE (guid, '', '');
Update Post Meta
UPDATE wp_postmeta SET meta_value = REPLACE (meta_value, '','');
Delete Revisions
DELETE a,b,c FROM wp_posts a
LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id)
LEFT JOIN wp_postmeta c ON (a.ID = c.post_id)
WHERE a.post_type = 'revision'
Delete ‘Spam’ Comments

DELETE FROM wp_comments WHERE comment_approved = 'spam';
Feb 142012

Here is the default DNS setting that are created when a new AddOn Domain are added to your hosting account.

AddOn Domain in this example:
Primary Domain IP address in this example: 14400 IN A 14400 IN A 14400 IN CNAME 14400 IN CNAME 14400 IN CNAME 14400 IN TXT “v=spf1 a mx ~all”