developing smarter web applications...

Welcome...

Here you will find my latest musings. Check out my Portfolio to see some of them in action. Contact Me if you like what you see or check out the company where I work...

Deploy node.js on cloudfoundry.com

Instructions to create a simple node.js app called node_app and then upload and run it on cloudfoundry.com.

In order to use cloudfoundry.com, you need to sign up and have your account approved. Do that now because approval does not happen immediately.

---

We will first get our node.js app working locally.

Download and install the latest node.js.

Change directory to where your code lives and then do:

Using a 1and1 git repository

On the 1and1 business accounts you can now use Git via SSH. Here is how...

Setup your master FTP password (which will be used for SSH).

SSH into your 1and1 account with (assuming example.com is on this account):
ssh username@example.com
mkdir repositories
cd repositories
git init --bare my_repo.git

Now on your local machine you can clone this repository with:
git clone ssh://username@example.com/~/repositories/my_repo.git

Or to add 1and1 as a remote location for an existing repository do:

Secure push and pull with git-http-backend

I am setting up a new repository machine for my code. I will be setting it up with Active Directory later on, but I figured my basic setup would be a good starting point for most people.

My new repo box is on CentOS. I installed Git on my server from the EPEL repository. All the commands in this tutorial will be done from sudo.

I created a simple password file on my server using this command.
htpasswd -c path/to/file/passwords user-name

To add a user to the existing password file do:

Delete a remote branch in Git

I run into this all the time. I am typing too fast when I push code to my remote repository and I make a typo that creates a new branch in my remote repository.

Correct: git push origin production:refs/heads/production

Mistake: git push origin production:ref/heads/production
Result: * [new branch]    production -> ref/heads/production

Obviously I do not want this new branch on my remote server, so I want to remove it. You can remove this newly created branch with.

Editing your hosts file on a Mac

This is a relatively common thing that I have to explain to clients.

It is often difficult to walk someone through changing their hosts file on a Mac, so I figured I would share the way I do it.

Open the Terminal:
Applications > Utilities > Terminial

Type the following and hit Enter:
sudo open -e /etc/hosts

This will open the hosts file in TextEdit. Make your changes and save...

Apache, MySQL and PHP on Snow Leopard

Snow Leopard comes with PHP 5.3 installed by default. Since I do a lot of Drupal development, I can't actually use that version of PHP and I needed to downgrade to PHP 5.2.x. I personally do not like the way that Apple has setup their AMP stack, so this is how I was able to get an acceptable one setup.

Note: This method uses MacPorts, so you will need to install that first.

sudo port clean php52
sudo port -f uninstall installed
sudo port installed
sudo port install grep
sudo port install apache2

Setting up a new UTF8 MySQL Database

Create a UTF8 database:
> CREATE DATABASE db_name DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

Create a user for the database:
> CREATE USER 'user_name'@'localhost' IDENTIFIED BY 'user_pass';

Grant all privileges to the user:
> GRANT ALL PRIVILEGES ON *.* TO 'user_name'@'localhost' WITH GRANT OPTION;
> FLUSH PRIVILEGES;
You should probably not give him all privileges on all databases, but you can change that as needed.

Manage and deploy Drupal code securely with Git, gitosis and Capistrano

UPDATE: I am now using git-http-backend instead of Gitosis. I made the switch because I needed a more central location for managing our projects. I have not written about it yet, but this new approach allows me to authenticate via an LDAP/Active Directory type service.

Eurotrip launches a new Trip Planning feature

Eurotrip.com has released its new and innovative Trip Planning tool today. This European travel website is jumping into the ring with companies like Dopplr and TripIt by releasing a planning application that allows users to better navigate the complicated travel planning process. Eurotrip already has a leg up on its competition with its flourishing community, all of whom are totally dedicated to budget backpacking. With the ability for savvy members to comment on travelers plans while they are still in the planning process, helping them avoid common pitfalls as well as giving great advice, Eurotrip has carved out a very exciting niche in the market.

 
Syndicate content