Archive for the ‘Code’ Category

Access EmberJS Data from a Component

February 11th, 2015 5 Comments

emberjs

 

I am building a small EmberJS application using the Ember-CLI. In the application I have a map that I wanted to load some data to. I ended up picking an Ember Component to control the map so that I could use the didInsertElement method to make sure that my maps markup was ready to be initialized.


//Component called main-map
export default Ember.Component.extend({
	componentMap: '',
	didInsertElement: function() {
		navigator.geolocation.getCurrentPosition(position => {
			//Initialize the map
			this.populateMap();
		});
	},
        populateMap() {
            ...
        }
});

(more…)

Creating a CSS3 3D image rotator

September 22nd, 2014 No Comments

A recent client project called for an image rotator that was essentially a 3D cube. I was pretty excited when I heard that, because I had not really had much of a chance to use any of the CSS3 3D stuff on a project yet!

Lets take a walk through the process of creating this slider!

First off, below is an example of the final product.

See the Pen CSS 3D Image Rotator by Ryan Christiani (@Rchristiani) on CodePen.


(more…)

Node and NPM no longer work after Mavericks update.

July 2nd, 2014 2 Comments

node-npm

I have had this issue a few times lately. I finally updated to Mavericks and low and behold node and npm no longer seem to work.

After updating to Mavericks, running node or the name of any npm package produced -bash: node: command not found

Here is how I went about getting it back up and running. These are a few ways I have found this that worked on all the computers I had this issue with.
(more…)

Working with the File API

April 14th, 2014 No Comments

For an app I am working on I wanted to upload an image through javascript and save it as a dataURL and then send it away to my MongoDB. At first I thought I would just get the image from an <input type='file'> and put it on a canvas and then get the information from there, but of course I ran into some issues, as just using the <input type='file'> will not give you what you want.
(more…)

Beginning AngularJs, and the Marvel API.

February 6th, 2014 1 Comment

AngularJS-Shield-medium

They say that AngularJs is the:

Superheroic JavaScript MVW Framework

So why not learn the basics of Angular and play with the newly released Marvel API?!

This is a pretty high level overview of how I put together a little app, FOUND HERE. It was my first crack at AngularJS. I have some experience with Backbone, and I am working on a larger app with it I will post about later, so some of the ideas made sense to me. However others just seemed like some Dr Strange magic…see what I did there?
(more…)