Skip to content

Instantly share code, notes, and snippets.

View mixonic's full-sized avatar

Matthew Beale mixonic

View GitHub Profile
@mixonic
mixonic / keybase.md
Last active August 29, 2015 14:02
keybase.md

Keybase proof

I hereby claim:

  • I am mixonic on github.
  • I am mixonic (https://keybase.io/mixonic) on keybase.
  • I have a public key whose fingerprint is C34B 0092 AF17 0AFC 9F22 3F5D 8FCD 4AB5 1F37 1A5E

To claim this, I am signing this object:

Pass at marketing copy

An authorization service library for your Ember.js application. <- Cory and I really like this as a tagline.

Torii is an authorization abstraction for Ember.js applications.

Adding social login to your Ember.js app just got a whole lot simpler.

Need an OAuth 2 authorization code? Let us do the heavy lifting.

@mixonic
mixonic / dependency-injection-and-service-lookup.md
Last active August 29, 2015 14:03
Dependency Injection & Service Lookup

Dependency Inject & Service Lookup

Dependency injection and service lookup are two important framework concepts. The first, dependency injection, refers a dependent object being injected onto another object during instantiation. For example, all route objects have the property router set on them during instantiation. We say that the dependency of the router has been injected onto the route objects.

App.IndexRoute = Ember.Route.extend({
  actions: {
    showPath: function(){
      // Dependency injection provides the router object to our
      // route instance.
@mixonic
mixonic / buffered-store-proxy.md
Created July 2, 2014 16:06
Buffered Store Proxy

If you have worked much with Ember-Data, then you know the buffered object proxy pattern:

http://coryforsyth.com/2013/06/27/ember-buffered-proxy-and-method-missing/

This pattern allows us to put changes to a model into a buffer instead of on the model itself. There are several benefits of this:

  • If the model has changes come from a push source (an attribute is updated), the changes will not destroy what the user is currently entering.
  • Saves can be de-coupled from dirty tracking. If you are saving a model as a user types, the model in flight will not accept changes from the user. You will get the dreaded cannot change an object inFlight error. With a buffer, you can commit the buffer to the model and save the model, then allow the user to keep making edits against a new buffer. No conflict.
  • In general, a buffer allows you to treat Ember-Data records more like database rows. You lock them for modification (while persisting them) but only for the shortest time possible. An object is made dirty then sav
@mixonic
mixonic / index.html
Last active August 29, 2015 14:05
Form Validation - Model#validate // source http://jsbin.com/afetez/280
<!doctype html>
<html>
<head>
<meta charset=utf-8>
<title>Image Search</title>
<script src='http://code.jquery.com/jquery.js'></script>
<script src='https://rawgit.com/dmdez/simple-masonry/master/jquery.simplemasonry.js'></script>
<script src='http://underscorejs.org/underscore.js'></script>
<script src='http://backbonejs.org/backbone.js'></script>
<style>
@mixonic
mixonic / gist:5a3692f1e86819a2f301
Last active August 29, 2015 14:05
EmberFest meet-up

Howdy friends and colleagues at EmberFest!

We hope you are enjoying the sunshine and beaches of Barcelona. Please join us for a casual pre-conference gathering tonight (Tuesday) at our flat, a ten minute walk north of the conference hotel:

5pm to 8pm

Passatge Taulat 14, 08019, Barcelona

https://goo.gl/maps/AXnd6

import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
@mixonic
mixonic / Facebooker with multiple facebook apps
Created July 9, 2009 13:13
Using multiple facebook apps with facebooker
Multiple facebook apps on one facebooker-powered Rails app. This
should be backwards compatible. For adding an app:
development:
api_key: 963285923uj23j8rj23j932
secret_key: fj329jf932jf9329t939hg239t
canvas_page_name: mainapp
pretty_errors: true
set_asset_host_to_callback_url: true
callback_url: http://www.host.com
#!/usr/bin/env ruby
require 'rubygems'
require 'curl'
require 'json'
client = Curl::Easy.perform(
"http://#{ENV['PPW_USER']}:#{ENV['PPW_PASS']}" +
"@www.pushpinweb.com" +
"/datasets/1.json"
@mixonic
mixonic / config.log
Created January 12, 2011 22:15
Trying to build Sphinx trunk on OSX 10.6.6 i7
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by sphinx configure 1.11, which was
generated by GNU Autoconf 2.65. Invocation command line was
$ ./configure --with-libstemmer --without-unixodbc --with-mysql=/usr/local/mysql --disable-debug CPPFLAGS=-I/usr/local/include -I/usr/local/Cellar/open-mpi/1.4.2/include -I/usr/local/Cellar/boost/1.45.0/include -arch x86_64 LDFLAGS=-L/usr/local/lib -L/usr/local/Cellar/open-mpi/1.4.2/lib -L/usr/local/Cellar/boost/1.45.0/lib CFLAGS=-O -arch x86_64 LDFLAGS=-arch x86_64 -L/usr/local/Cellar/open-mpi/1.4.2/lib -L/usr/local/Cellar/boost/1.45.0/lib CXXFLAGS=-O -arch x86_64
## --------- ##
## Platform. ##