Dec 312011
 

This is the first part of a three part series on how to embed a Google Calendar into a web page and use it to accept online bookings/appointments from other online users.

The Series:

  1. Part 1: Setting up Google Calendar <- You Are Here
  2. Part 2: OAuth2 and Configuring Your ‘Application’ With Google
  3. Part 3: A Sample Web Page For Bookings

Part 1: Setting up Google Calendar to be embedded into a web page

You can already use Google Calendar on your web page for displaying your schedule. This tutorial will take you through that process quickly highlighting some of the key pieces that you will need later.

Step 1: Signup for a Google Account and Create Your Calendar

I’m going to assume you have, or know how to get a Google Account. You can get a Google Account (with your email address) here: https://accounts.google.com/NewAccount or you can just sign up for a Gmail account, which is awesome, here: https://accounts.google.com/NewAccount?service=mail&continue=http://mail.google.com/mail/e-11-cf5c9f72b92b7a0f5c1f47b879e4b-e035ec50fab44f274a9436e7e96b8bbcef278d4e&type=2.

Now, go into Google Calendar, and create a calendar that you will use for your appointments.

Give the calendar a name (1), description (2), and location (3).

Here you have the option to configure sharing (4). You will need to make the calendar public for others to see it. You can optionally choose to display only Free/Busy information to protect the privacy of the events (5).

Now, you need to grab the embed code to add the calendar to your site. You grab this by going to Calendar Settings.

Step 2: Get The Calendar Embed Code and Calendar ID

Here you will see the embed code (1), and a link to customize your output. On this page you will also see the Calendar ID (2).

This code will put an IFRAME on your page which will display your calendar. You can use the customized to tweak the look and feel of the calendar.

You will need the calendar ID for the next parts of the tutorial.

That is the end of this tutorial. You now have a calendar added to your website which will display your schedule to your web users.

Stay tuned for Part 2 of the tutorial, which will get our application set up with Google so that we can use the API to add events to the calendar.

Dec 242011
 

For those who work on multiple Linux/Unix machines, we sometimes need to do work remotely. Sometimes the terminal doesn’t cut it, and we need to use a GUI application. There are a number of ways to view a GUI on a remote machine, but one way is by X11 forwarding through an SSH connection.

One problem with X11 forwarding, especially over the internet, is the slow speed. This post hopes to explain X11 forwarding, and ways to speed it up.

You can use the command:
ssh -c arcfour,blowfish-cbc -X -C user@192.168.11.3
To establish an SSH session with X11 forwarding enabled. Then all you need to do is launch a X program and it should appear on your local display. Before I explain the command, you must first have X11 forwarding enabled in your sshd_config on your server. Set X11Forwarding yes in your config file.

Now, for the SSH command:

  • -c arcfour,blowfish-cbc : specifies the encryption algorithms to use. These seem to be some of the fastest.
  • -X : This enables X11 Forwarding
  • -C : This enables compression
  • user@192.168.11.3 : This is the user name of the remote machine, and the IP address of that server.