John Svensson Söderkvist | johnsvensson.com | Webbutvecklare

If you are going to use the ESP8266 with a FTDI-cable, you first need to install some drivers. Actually this is pretty basic IF you read the manual (link is below), but if you are like me; here are the steps you “need” to follow.

1. First uninstall Apple-provided FTDI VCP driver, from the Terminal.

Type :
cd /Library/Extensions
sudo rm -r FTDIUSBSerialDriver.kext

Reboot…

2. Download VCP-drivers and install, normal .dmg-install. (Even I now how to do this, just follow the wizard).

3. Download D2xx Drivers (1.2.2) copy libftd2xx.1.2.2.dylib (think I used the one in /bin/10.5-10.7) into the dir /usr/local/lib (use Terminal or Finder).

So run yourdomain.xxx/wp-admin/upgrade.php (but replace yourdomain.xxx with your own, stupid!) and run the upgrade wizard and you should be fine, if not; follow the other suggestion in the support post.

I suspect that db_version in wp_options did not match the new WordPress install.

“Hosting websites has never been this easy
Keep your websites up and running. Zero server hassle.”

One great thing is the ability to clone (or duplicate) an installation of WordPress (like a staging sever), but that is _exactly_ what it is, a copy. That means that the clone has the root installation URL, so when you try to log in at your new clone it points back to your root installation, not cool. A feature request is made, but in the meantime this following method is a poor mans solution to the problem.

Open up wp-config.php and paste this:

define('RELOCATE',true);

Then visit http://myclone.xxx/wp-login-php (Not /wp-admin, didn’t work for me at least) (Replace myclone.xxx with your own URL).

On line 4 we get any attachments and suppress any warnings/notices with the @-sign (@$data).

We then run a inline foreach to get all the attachments (only photos in this case) and echos out the src for the image. Note that the [1] on line 7 gets the second element in the array. Without any deeper investigation I believe you get the largest image. The first element is the small (_s), thumb. (See below for an alternative solution).

Alternative image solution

In the $image object there is ‘src’ ($image[‘src’]), where you get the small source (_s). You can then use the same replace-method in the previous post to get the normal (_n) one.

A twitter friend asked me about creating a custom feed for a Facebook wall. Pretty easy with the php sdk, but when I looked at the source it turns out I made it another way. Better or worse? You tell me.

The ‘each’ loops through the content in the personController and outputs each name. The ‘#’ means start of the handlebar view and ‘/’ is the end point.

Run the app and it should output:

Adam
James

The Bonus part

To enhance the app somewhat we add a model. Right before the personController add:

App.Person = Em.Object.extend({
name: null
});

This adds a new model, class (whatever you want to call it). Setting a name and setting it to null is not necessary but it can help to remember what properties the model exists of(f)(?)
init: function() {
this._super();
var person = App.Person.create({
name: ‘Linda’
});
this.pushObject(person);
}

this._super(); calls the parent class (super is a reserved to JavaScript hence the underscore _ ) and you need to do this inside the init so the init method will be called all the way up the prototype chain. (source Cerebris)

Then we create a instance (person) of the class Person and set its name property to ‘Linda’ and finally push (add) this to the content array.