Skip to content

Instantly share code, notes, and snippets.

Avatar

terry chay tychay

View GitHub Profile
@tychay
tychay / config.js
Last active Mar 1, 2017 — forked from pywebdesign/config.js
Restangular adapter to expand compound documents from jsonapi.org
View config.js
// This variation just injects the extracted data right into the relationships and also stores things in
// ._meta and ._included instead of just .included
// it (like restangular) requires either lodash or underscorejs
.config(function(RestangularProvider) {
// add a response interceptor
RestangularProvider.addResponseInterceptor(function(data, operation, what, url, response, deferred) {
var extractedData = data.data;
@tychay
tychay / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
You can’t perform that action at this time.