Month: April 2014

Heroku takeof

Using rake to automate heroku tasks

Kakimoto Online

One of the cool things that I’ve learned at ThoughtWorks is automating stuff. Automating daily tasks is pretty cool and important. For instance, all the teams that I’ve worked in the past 3 years create scripts to automate builds, deploys and database backups between other tasks.

At Motonow we try to do the same. Because we use Heroku infra-structure we have to remember a lot of the toolbelt’s commands in order to deploy the app, run database migrations and backup the database. Although the commands are pretty simple, we found ourselves running theses commands in a specific order and many times a day, which bother us a lot.

To avoid that, we decided to create rake tasks to automate some of the things we use frequently.


Motonow deployment process is pretty straightforward. It’s basically composed of three steps at the time of the writing:

  1. Pushing code to Heroku;
  2. Running database migrations;
  3. Restarting the app;

Because we go to production many…

View original post 408 more words

Salesforce Dynamically Adding/Deleting rows in visualforce


Addition or removal of line items can be done dynamically on click of a button without refreshing the complete page. It can be achieved easily by using the reRender attribute of the visualforce component.

Below code is a simple example which shows Contacts linked to an Account. User can delete or add multiple contacts to an account by clicking the “Add Attendee” button. The code uses a index called rowNumber which keeps track of the row number to be deleted.

Visualforce Page :

<apex:page standardController="Account" extensions="addAttendee" sidebar="false">
 <apex:form >
 <apex:pageBlock title="Accounts" id="pb">
 <apex:pageMessages />
 <apex:variable var="rowNumber" value="{!0}"/>
 <apex:pageblockSection columns="1">
 <apex:pageBlockTable title="Contacts" var="acc" value="{!attendeeList}"> 

View original post 193 more words

Serving AngularJS templates from static resources

Force 201

An AngularJS app typically starts with an “index” page that loads the required JavaScript/CSS and acts as the container for the client-side processed content. The app operates by rendering various templates in response to user interactions into that container.

That “index” page is a good place to obtain information from the “Visualforce” world that can be passed to the “AngularJS” world, and so is best made a Visualforce page. (See Passing platform configuration to an AngularJS app.)

But what about the templates? Typically there are many of these. Should they also be Visualforce pages? At first sight it seems a reasonable thing to do as the templates are “partial pages”. And Visualforce pages have fixed URLs whereas static resources have URLs that include a timestamp making them harder to reference in JavaScript code such as a route provider. And if you use individual static resources per template (rather than…

View original post 140 more words

Why Excel and Multi-BOM are killing collaboration?

Daily PLM Think Tank Blog


Excel and Bill of Materials. What can be better to start a discussion? One of my favorites blogging buddies and author of eng-eng blog Ed Lopategui hit the button of BOM & Excel discussion in his GrabCAD blog – It’s time to drop Excel BOM. I liked the following passage. It speaks about huge cost involved in management of changes using Excel:

There’s one fundamental constant in all of engineering: change. Aligning with the capability to change quickly and often is crucial in fighting back ever-increasing schedule pressures. Excel BOMs provide no help here. A separate Excel BOM has to be manually synchronized with each design change. It’s usually in this confusion where some of the bigger and most expensive errors tend to happen. Conflicts are common and notoriously difficult to set straight. Recognize that the information in a BOM is every bit as vital as your CAD design…

View original post 443 more words

More Sort Functions

Newton Excel Bach, not (just) an Excel Blog

I have recently added three new sorting User Defined Functions (UDFs) to the SortFunc-py spreadsheet, and added a new option to the SortV function.  The new file may be downloaded from, including full open source code.

The first new function is  SortVI, which works in the same way as SortV, but adds an additional index column to the output array, listing the position of each row in the original unsorted array (click any image for full size view):


The other two new functions allow sorting of rows, rather than columns.  The built-in Excel sort routine allows for sorting in either a vertical or horizontal direction (as shown below), but the new UDFs provide a dynamic sort, when used on the spreadsheet, and can also be used on VBA arrays.


The SortH function provides the same functionality as SortV, except that the data is sorted by rows, rather than columns.  Both…

View original post 106 more words