What's New

Doing a lot of work and studying in AngularJS and the MEANJS stack. 

Drop me a note if you're looking for something you can't find.

Peter

When Did I Become a Car Guy?

Having driven a 1966 VW bug, 1969 van, 1972 bug, dasher, 72 van, in my early years, then Lynda and I drove the van and Penelope till we got Goldie.  Then Goldie died and we got snowball. Later we bought shadow our most expensive car to date.  Shadow and Goldie served us for years till we got hit heading to La Verne. That lead us to Lexie. Lexie served is well until a furlough Friday when her transmission failed.  

Old House

Going through these hundreds of snapshots, I'm reminded about some of our design principlles in going from the old house to new house. No 70's wallpaper, no vinyl floor patterns, easy cat cleanup, no electric range, no brown tile, no clutter, no slipping on bricks, no dark woods, no carpet, filtered air, filtered water, better and more lighting. 

Even the cats got a new wall library out of the deal.

Fireplace Insert

After we moved the propane tank, we knew we wante to stop using the wood burning stove and the old fireplace was never utilized. So, we did a fireplace insert with gas and we've never regretted it. I've updated the thermostat to work with our home automation tools and we can heat the front room in 10-15 mins.  We used Woodstove and Sun and we'll use them again for the firepit supplies when that project gets scoped.

Hydroseeding

After the septic was replaced and hillsides graded and a lot of brush removed, Ken suggested we hydroseed to protect the open hillside. This gave ua a great bloom of wildflowers and grass.

What was surprising was that Morgan Karst of Superior Hydroseeding was someone I went to high school with.

Grading Projects

We did a lot of work on grading projects with Ken Clausing of A+ Construction. He and his crew replaced our septic lines, removed a lot of brush, graded a swale, graded a place for the propane tank, removed stumps and gave us lots of good advice for mountain livin'.

Septic System Replacement

The failed septic system in late May 2012, got us started on a number of projects. Ken Clausing of A+ Construction was nice enough to come up that day. This is the project that started it all...

New Kitchen Slide Show

Here's a new slide show for the new kitchen. This is part of the work conducted by Santa Cruz Kitchen and Bath. Joshua Scott Construction was the contractor. Andrew Wightman the designer.

The hood is a custom fabrication by RCR Fabircation here in Santa Cruz.

Upgrading Drupal on Ubuntu 14.04

I finally upgraded my Ubuntu 10.04 LTS Linode to Ubuntu 14.04 LTS. Had a heck of a problem with what should have been a very simple upgrade.

MeanJS - Expose data as JSON via API

One of my objectives with migrating data out of Drupal and into a MEAN stack app is for easier management of downstream requests for JSON data. We want to take advantage of the built in functionality of the MeanJS stack, and here's a simple exaple.

In this use case we wish to expose articles to some other app who will make a HTTP GET request for all the articles or just one.

In app/controllers/articles.server.routes.js, we need to add entries for the two functions we'll allow via GET.

Tags: 

MongoDB and GeoJSON - Pro Tip!

Well, I'm no expert but here's a tip that might save you some time. I have a Drupal databae outputting valid GeoJSON data. Our data looks like this:

Tags: 

MeanIO and MeanJS - My Notes

I took some time to try MeanIO over the past few days. While I ended up coming back to MeanJS, I drew some conclusions that might be helpful.

Here's the use case. I wanted to take a GeoJSON file, load it into a boilerplate MEAN stack, generate CRUD files and get a basic app tested. Ideally, I'd want to tweak the layouts, menus, and boilerplate HTML as well as use bower to add js libs that add functionality.

Tags: 

Importing GeoJSON data into MongoDB

Update 5/1/15 - On a different instance of Mongo, I had run the command noted below and got errors. However, this worked:

mongoimport --db mean-dev -c points --file "points.geojson" --jsonArray

 

Let me save you the hours lost in trying to figure out getting GeoJSON features into individual documents in a collection versus one document with nested features.

MongoDB 3.0.2. Valid GeoJSON file full of 809 features.

Using this code:

mongoimport --db test --type json --file ./'mobilemaps.geojson' 

Tags: 

Travel in 2014

Before I forget too much of 2014, I thought I'd write down some of the cool travel we did last year.

We started with a trip to Miami and Key West in late December through early January. We hung out at the Fontainbleu and the Southernmost House. Warm, good food, lots of exercise.

In late March through early April, we went to London for 10 days. Lnda's had a Courseara conference. I walked around the city listening to Elvis Costello, The Clash, Cream, Jeff Beck and others, seeing the sights and acting as support for Lynda and Lauren Butler

Tags: 

Theming Foundation 4 Submit Button

Here's how I lost 3 hours. In using a comination of these modules with the Drupal Foundation theme. I wanted a small search button aligned right in the right sidebar. See http://mobilemaps-dev-proxy.ucsc.edu.

  • search api
  • search api autocomplete
  • search api live results
  • Foundation 4 theme

 

Extending the MEAN Stack Example

One thing that has been frustrating me in learning the MEAN stack has been how to extend the basic Article example (or a CRUD created module) beyond the basic data model. While you're trying to learn AngularJS and Mongoose/MongoDB interactions, you can find lots of literature on modelling, but little on how to modify your core CRUD views, model and controllers to work together. I'm sure that there may/are better and more elegant ways to accomplish this.

Tags: 

Importing Data - MongoDB

Importing to Mongo via jsonArray
mongoimport -d meanjs-leaflet4-dev -c leaflets -f name,coordinates --type json --file building-addresses.json --jsonArray
 
// sample file
// notes - coordinates needs to be bracketed to indicate an array otherwise we get string
// created - use a yyyy-mm-dd for basic entry
    [
    {
      "name": "Cowell College - Apartment  2",
Tags: 

Getting MEAN with Leaflet Markers

Over the past week, in between meetings, I've gotten some additional functionality added. I've been able to enter a number of Leaflet nodes (records) and then display markers on the "list" view. I've created a link in the popup that then takes us to the detail record. I've also been taking Dan Whalin's Udemy course. His site has a 50% off coupon code.

The MEAN Stack and Leaflet - My Notes

I've been looking at how to refactor our campus maps app from being Drupal based to sometihng that is based on a RESTful API so that data can be easily shared with other apps. Drupal has gotten us a long way, but the map stack of modules we're using has some limitations. I need to pull some custom map work stored at Mapbox.com giving us deeper zooms and styling rules we've decided upon.

The MEAN stack offers one refactoring option. So, I spent Christmas vacation doing some reading, configuring and thinking about how the MEAN stack might work for our needs.

Some SmartOS Tips

In getting up to speed with SmartOS, it's useful to remember that there are a number of built-in scripts to make life easier.

Tags: