Skip to content

Instantly share code, notes, and snippets.

@joelkallman
joelkallman / ember-addRoute.js
Created July 30, 2013 15:45
Dynamically Add Routes in Ember.Router
/**
* Add Route
*
* This will dynamically create the following routes for the name passed.
* Anywhere you see "name" below, replace with the passed param for name.
* e.g. addRoute(this, "posts") -> URL = "/posts", Route = PostsIndexRoute, etc.
*
* IMPORTANT: All templates render INTO "name" parent template. Put an {{outlet}} there
*
* URL | Route Name | Controller | Template
@retgef
retgef / pug-bomb.php
Created June 24, 2012 07:46
Pug Bomb API Endpoint WordPress Plugin
<?php
/*
Plugin Name: Pug Bomb API Endpoint
Description: Adds an API endpoint at /api/pugs/$n_pugs
Version: 0.1
Author: Brian Fegter
Author URL: http://coderrr.com
*/
class Pugs_API_Endpoint{