Ulyssesonline

the tech surfer

  • Home
  • About
  • Archives
You are here: Home / 2012 / Archives for February 2012

Archives for February 2012

February 28, 2012

Create Your Own Google+ ID Card

Create Your Own Google+ ID Card

Create your own Google+ ID card at Hangout Graphics. If you haven’t joined Google+ yet, sign up. To get your own ID card, you will need to provide your Google ID number, and the date you joined Google Plus. Hangout Graphics will then spit out an image after you click submit. Finding out your Google ID number takes a little bit of searching. I found mine under Google+ Settings > Privacy. Getting the date when you first joined Google+ is the tricky one. I ended up digging in my email to look for then message when I first got the Google+ invitation.

Get your own Google+ ID card.

Filed Under: Tech Tagged With: google, id card

February 27, 2012

Calculating Dates in PHP

Displaying dates in PHP is a no brainer. You simply echo the date() function to display the current date. For example, echo date(‘Y-m-d’) will display the current date in the ISO date format of ‘2012-02-27.’ However, calculating dates in the past or in the future is a tiny bit more tricky. For accuracy, I recommend that you use mktime(), which converts time to Unix timestamp. You can then perform date calculations in Unix timestamp which is much more accurate. You do have the option to change the format back to ISO, if you desire. Here are a few examples.

Display the current date:

echo date('Y-m-d');

echo date('Y-m-d');

Output: 2012-02-27

Convert to mktime:

$t = mktime(0, 0, 0, date("m"), date("j"), date("Y"))

$t = mktime(0, 0, 0, date("m"), date("j"), date("Y"))

Display the start of the current month:

echo date('Y-m-d', mktime(0, 0, 0, date("m"), 1, date("Y")));

echo date('Y-m-d', mktime(0, 0, 0, date("m"), 1, date("Y")));

Output: 2012-02-01

Display the end of the current month:

echo date('Y-m-d', mktime(23, 59, 59, date("m")+1, 0, date("Y")));

echo date('Y-m-d', mktime(23, 59, 59, date("m")+1, 0, date("Y")));

Output: 2012-02-29

Display the start of last month:

echo date('Y-m-d', mktime(0, 0, 0, date("m")-1, 1, date("Y")));

echo date('Y-m-d', mktime(0, 0, 0, date("m")-1, 1, date("Y")));

Output: 2012-01-01

To display the end of last month:

echo date('Y-m-d', mktime(23, 59, 59, date("m"), 0, date("Y")));

echo date('Y-m-d', mktime(23, 59, 59, date("m"), 0, date("Y")));

Output: 2012-01-31

Display the start of next month:

echo date('Y-m-d', mktime(0, 0, 0, date("m")+1, 1, date("Y")));

echo date('Y-m-d', mktime(0, 0, 0, date("m")+1, 1, date("Y")));

Output: 2012-03-01

Display the end of next month:

echo date('Y-m-d', mktime(0, 0, 0, date("m")+2, 0, date("Y")));

echo date('Y-m-d', mktime(0, 0, 0, date("m")+2, 0, date("Y")));

Output: 2012-03-31

This code is very flexible. If you like to display the dates to any other format, you can change the date format to any format that you like. Check out all the different date formats. I hope this was helpful.

Filed Under: PHP Tagged With: date, mktime

February 21, 2012

Google Voice on Ubuntu Desktop

Google Voice on Ubuntu Desktop

This article will show you how to use Google Voice on your Ubuntu Desktop. If you don’t have a Google Voice yet, you can sign up for free and get your own local number. I’ll assume you already have Google Voice, and your computer has a soundcard. In addition, you will also need a headset with a microphone.

Once you have those requirements squared away, you will need to download the Linux plugin for Google Voice. By the way, the plugin is also available for Windows and Mac users. Once the Google Voice plugin installed on your system, you can then start making phone calls.

Here’s a screenshot when dialing out with Google Voice. With Google Voice, you can call any landline or mobile phone in the US and Canada for free. Google Voice has competitive international rates as well, for those wanting to call outside of the US.

I recommend that you do an actual test with your cell phone before calling friends, clients and others. This is just to make sure you can actually hear voices on both ends of the line.

Filed Under: General, Tech Tagged With: Google Voice, voip

  • 1
  • 2
  • 3
  • …
  • 5
  • Next Page »

Copyright © 2003 - 2018