React 101 – Components must start with capitals

A very important bit of doc to read: https://facebook.github.io/react/docs/jsx-in-depth.html#html-tags-vs.-react-components TL;DR:   <component /> compiles to React.createElement(‘component’) (html tag) <Component /> compiles to React.createElement(Component) <obj.component /> compiles to React.createElement(obj.component)

Backbone Paginator Server Sorting

Recently I had to sort a collection using server mode (that is, doing a fetch for each page). It turns out this was not a simple as it seemed, needing to pass some extra options to the mode switching to stop the state being lost (as I could not set the pagination mode on the […]

Nested Marionette Behaviors

Today I was having trouble with Nested Behaviors in Marionette 2.4.2. The trouble was, how do I get options into my behaviors in behaviors? Here is my situation: view.js: View.Main = Marionette.ItemView.extend({ … behaviors: { // named so the sub behavior can access this! behaviorName: { data: ‘someData’, behaviorClass: BehaviorName, } } … }); Then […]

Publishing a Yeoman generator and its sub generators.

So I have a Yeoman generator that helps scaffold a Backbone.Marionette application using the module paradigm, which is all good. Though I did get a little caught out when publishing the sub-generator component of it. That is so you can do things like yo marionette-modules:module aSubModule, to get a module generated. The :module part was […]

Changing to access Github via SSH instead of HTTPS

Recently I finally got around to adding my public key into my Github account, as described here But then there is one more step you have to do to your already existing checked out projects to get them to use this. That is update the origin to use SSH and not HTTPS. So cd to […]

Deploying Symfony2 on Dreamhost

There is a few things I had trouble with getting Symfony2 to work on Dreamhost shared hosting. All in all it was quite a mission. So here are some of my steps to help for next time. We would like to use PHP 5.4. But default the PHP Cli is 5.2. So some changes are […]

WordPress: How to create a new role in a plugin

Some notes to remember how to create a special functions in a plugin that can only be seen by a user with that role only. Note this saves to the database, so add it in your plugin activation codes: $result = add_role(   ‘role_name’,    __( ‘Fancy Role Name’ ),      array(      ‘my_custom_capacity’ => true, […]

Cordova 3.0 www/res extra images remove

When building a Cordova 3.0 project lots of extra images get added in. As of now I have no idea how to exclude them in the normal build process: cordova build ios etc. They are from the www/res/icons and www/res/splash folders Here are the steps I take to remove them: For Android I just run […]