Zhixian's Tech Blog

2014-12-21

How to Add Google App Engine project to Google Developers Console

This blog post describes how to create add Google App Engine project.

Assumption

You have a Google account.

Summary

  1. Log in to Google Developers Console
  2. Create Project

Log in to Google Developers Console

In your web browser, navigate to Google Developers Console (https://console.developers.google.com/)

Google Developers Console - Firefox Developer Edition_097

After you logged in, you should be redirected to your project page.

Create Project

Click Create Project to display the new project.

Google Developers Console - Firefox Developer Edition_098

On the New Project dialog, enter:

  1. A name for your project.
    For example, I am naming my hello world project as zx-helloworld.
  2. An id for your project.
    Important This id will be used for the deployment of your project.
    For example, I am naming my hello world id as zx-helloworld.
  3. Click Create to add the project.

Note

The project id needs meet the follow criteria:

  1. Starts with a lower-case letter (a-z)
  2. May contains lower-case letters, digits (0-9) or hyphen (-)

Google Developers Console - Firefox Developer Edition_099

After you clicked Create, the dialog will close.
You should see a small popup at the lower right-hand corner of the page.

Google Developers Console - Firefox Developer Edition_100

The popup should indicate that its creating the project.

Google Developers Console - Firefox Developer Edition_100

After the project is created, it should redirect you to the project dashboard.

Google Developers Console - Firefox Developer Edition_101

The popup in the lower right corner of the page, should have a green checkbox.

Google Developers Console - Firefox Developer Edition_102

With this, your Google App Engine project can be deployed using the project id that you defined.

Advertisements

2011-12-03

Running Umbraco source code

Filed under: web application development — Tags: , , — Zhixian @ 08:59:12 am

If you are trying out Umbraco content management system (CMS) using the source code (as oppose to using the Web Platform method recommended for end-users), you may encounter the following problem.

Upon running the solution (or more specifically the umbraco.presentation project) for the first time, you may get a login screen instead of the setup screen.

imageLogin screen

imageInstallation screen

Ok.
After getting the login screen, you maybe thinking “Ok. Since I reached the login screen, there must be some administrator credentials that I can use to access the administer the site.

Wrong.

There is no default administrator credentials.
The administrator’s password is set as part of the installation setup.
But wait, we get a login screen. 
We didn’t get any installation screen.

At this stage, you are probably wondering what’s going on.
The cause of this is because the application setting umbracoConfigurationStatus in the web.config file is set to some value.

image

To get the installation screen, we should be setting the value for that setting to be an empty string.

image

After you saved the web.config, you should see the installation screen.

2011-06-25

Installing Windows Live Essentials on Windows XP as a VirtualBox guest OS

Filed under: computing — Tags: , , , , , — Zhixian @ 08:59:06 am

This is about a firewall issue that I encountered while installing Windows Live Essentials on a Windows XP guest OS.

I was setting up another copy of Windows XP on VirtualBox today and along the way, I decide I want to install Windows Live Essentials. So off I go to Microsoft Download Center and download a copy of the Windows Live Essentials.

Note: You cannot get the latest version of Windows Live Essentials which at this time of writing is Windows Live Essentials 2011. For some reason, Microsoft decide to ditch all the users in the Windows XP space in favour of users in Vista and Windows 7 space…Its almost looking as if this will be the last version of Windows Live Essentials that Microsoft will support for XP. Very sad 😥

Everything was fine prior to running the setup file.

Before running WL installer

Here’s the mysterious part. After I execute the installer, my network connection starts to shutdown.

WL running mod

 

After after a while, I get the following screen.

WL Stopped

Umm….I don’t think that’s the correct response. I WAS connected to the Internet before you came along. Clicking on the details button, I get:

WL Stopped in detail

Umm…Thanks for the advice. Its real helpful. I will take that into consideration once I figure out how to run the installer without it killing off my Internet connection at the same time.

So, what went wrong?

The problem lies with the Windows Firewall on the host OS. Recall that this copy of XP was running as a guest OS on VirtualBox. Hence all network traffic would flow through the host OS and its firewall as well.

Now theoretically, Vista should have notify me when the firewall blocked a connection.
However in this particular instance, it did not. 😦

image

 

And in case you are wondering, no, I did not block all incoming connections.

image

Nonetheless, under the Events Viewer, I see:

image

Hmm…Its time to google…which led me to Microsoft’s TechNet site for troubleshooting firewall. An article there led me to think that I need to enable IPSec and Firewall events audit events. You can find out how to do that by going to Enable IPsec and Windows Firewall Audit Events.

But quite honestly, that did not work for me.Vista still did not notify me when the firewall block a outgoing connection. But the message in the event viewer did changed to:

image

And

image

 

So, what’s next?

By this time, I’m starting to get tired of dealing with the firewall issue not to mention I have run out of concise solutions to this problem.

I decide its time for drastic measures.
So I simply turned off Vista’s firewall.
Then went off to my Windows XP guest OS and install Windows Live Essentials.
After the installation completed, I switched Vista’s firewall back on.

And it worked! Live Messenger and Live Writer all that Live Essentials stuff will continue to work.
So apparently, the issue lies with Windows Live Essentials installer.

2011-06-19

Change the UUID of a Virtual Box hard disk

Filed under: computing — Tags: , , — Zhixian @ 10:09:06 am

At times while using a Virtual Box (VB) guest, I would find myself wanting to clone my current working environment so as to try out something. This involves cloning the hard-disk file (better know as VDI files for the .VDI file extension that it uses) that your current guest environment is utilizing (since the hard-disk is where your operating environment resides). There are 2 ways of doing this.

  1. The incorrect but no-brainer way
  2. The correct but involves you reading the included help files way

Both methods involves using a very useful command-line tool VBoxManage that can be found in your Virtual Box installation directory.

I’ll cover the correct way first. The proper way to clone the hard-disk is to use the command:

VBoxManage clonehd <source-file> <target-file>

This command in effect performs 2 operations:

  1. copies the source VDI file to the new target filename that you defined
  2. assign a new UUID to the new target file

Step 2 is important only if you are reusing a VDI file on the same Virtual Box machine. This is because Virtual Box tracks all the hard-disks attached by its guest operating systems by means of this UUID. A Virtual Box host cannot have 2 VDI files with the same UUID. This brings us back to the 2nd method of cloning Virtual Box VDI files, the no-brainer method.

The no-brainer method comes with the realization that each hard-disk utilized by Virtual Box is simply a file. This inspires the thought that “Hey! I can just simply copy the file to so-call ‘clone’ the hard-disk.” and that’s what most people do without reading the product documentation not realizing that the UUID of the hard-disk is a factor.

The realization of the UUID as a factor would come when we try to attached the copied hard-disk file to a the new guest operating system that we are defining.

image

“Hmm..So what do I do now?” would be a common thought. This is especially if you had copied a fairly large VDI file (50GB?!!). Luckily, there’s a hidden command in the VBoxManage command tool for circumstances such as this.

Note that hidden command is development tool, is completely unsupported and is subjected to changes in incompatible ways without warning (ie. use at your own risk). Having said that the command we will be using is:

VBoxManage internalcommands sethduuid <target-file>

Note the command parameters “internalcommands” and “sethduuid” are case-sensitive.

After entering this command you should see something along the lines:

UUID changed to: 8c9882f0-95f8-46ad-8e93-79cb53fa24b9

After which you should be able to attach the copied file to the guest operating system now.

2010-09-05

DOSBOX Window Resolution

Filed under: computing — Tags: , , — Zhixian @ 02:34:09 am

I was trying out DOSBOX to run some old DOS games and applications.
It works fairly well and I was quite happy with it (especially when I thought of early DOS emulation which were fairly disappointing).

However, one of the annoyance I had with it the tiny, tiny window that it renders the emulation window by default.
The documentation is there but it isn’t that intuitive about tweaking this to give you a better screen resolution for the window.

As it turns out, all I have to do is configure my DOSBOX configuration (filename: dosbox.conf) to the following under the [sdl] section:

fullresolution=1024×768
windowresolution=1024×768
output=opengl
hwscale=2.00

Its interesting to note:

  1. fullresolution and windowresolution must be the same.
  2. output does not work for directdraw (ddraw)
  3. I didn’t find this setting hwscale earlier anywhere.

In any case, after you have save the changes, start a new instance of the DOSBOX and you should be able to get a bigger window.
Now you can view the text without straining your eyes. 😀

2010-07-11

Set MySql default collation to UTF8

Filed under: computing, database, web application development — Tags: , , , , , , — Zhixian @ 02:06:07 am

One of the bad thing about installing MySql using Ubuntu Software Center is that it does not allow you to select the default collation of MySql Server. This is one of the nice things you would find in the Windows version of MySql installer.

In any case, to set MySql collation to use UTF8, all you have to do is:

  1. Edit your MySql configuration file (typically found at /etc/mysql/my.cnf)
  2. Under the section [mysqld]add the following lines:
    # utf8
    init-connect=’SET NAMES utf8′
    character-set-server=utf8
    collation-server=utf8_general_ci
  3. Restart your MySql

2010-07-03

Using Personal Package Archive (PPA) in Ubuntu

Filed under: computing — Tags: , , , — Zhixian @ 02:13:07 am

Some preamble on what are PPAs

PPAs or Personal Package Archives are software packages generated by individuals that not checked or monitored. You install software from them at your own risk. That is to say, one should only install PPAs from individuals or organisations that they trust.

While trying to find a decent offline-blogging client tool that would support Windows Live Spaces, I read that BloGTK is a tool to try. So, I fired up my Synaptics Package Manager (SPM), do a search for “blogtk” and installed it.

Unfortunately on Lucid Lynx, I found that it refuses to start up. It would start and then mysteriously closes.

I went to the author’s site and read that the author has released a newer version on his repository. Unfortunately, this newer version is not available yet on the default software repositories that my Synaptics Package Manager is connected to. Which means if I want to use it on Lucid Lynx I have to add the author’s repository to SPM.

Luckily this is quite simple to do. Things to note: the PPA in question. In this case, the PPA for BloGTK happens to be ppa:jayreding/ppa. So on your terminal, punch in the following commands:

Add repository
sudo add-apt-repository ppa:jayreding/ppa
System will now fetch the PPA’s key. This key allows system to verify that the packages in the PPA have not been interfered with since they were built.

Update the package list from repository
sudo apt-get update
System will now look at available packages on the PPA and add them to the local repository packages list.
After this is done, you can fire up SPM again and search for “blogtk”. You should be able to see the newer version there. Installed it and you should be able to use BloGTK to write your blog posts.

Enabling user directories on Apache

Filed under: computing — Tags: , , , — Zhixian @ 01:32:07 am

To enable user directories on Apache, follow the following steps:

Go to Apache’s enabled modules directory. The default directory location should be “/etc/apache2/mods-enabled”:
cd /etc/apache2/mods-enabled

Create symbolic links from mods-available to mods-enabled directory using the following commands:
sudo ln -s ../mods-available/userdir.load
sudo ln -s ../mods-available/userdir.conf

Restart Apache:
sudo apache2ctl restart
At this point, user directories should be enabled. To test it out perform the following steps:

Go back to your user directory and create a folder named “public_html” cd\
mkdir public_html

On your browser navigate to the location “http://localhost/~username“. For example, since my username is “zhixian”, I would type the following as URL in my browser: http://localhost/~zhixian/
Since the public_html folder is empty, you will get an empty directory listing. Add a “index.html” file to set the initial content.

Blog at WordPress.com.