Skip to content

Instantly share code, notes, and snippets.

View runspired's full-sized avatar
💜
Pondering Paradigms

Chris Thoburn runspired

💜
Pondering Paradigms
View GitHub Profile
@alexdiliberto
alexdiliberto / ember-data-type-pluralization-and-relationships.md
Last active April 25, 2019 17:20
Ember Data, Type Pluralization, and Relationships

A huge "Thank You" to @runspired for all the help in the #ember-data Ember Community Discord!

// models/foo-bar.js
export default class FooBar extends Model {}

JSON API "type" === "modelName" === "foo-bar".

@nolanlawson
nolanlawson / wishlist.md
Last active May 3, 2021 11:51
Safari IndexedDB/WebSQL bug wishlist

Safari IndexedDB/WebSQL bug wishlist

Big overview of what's missing in Safari 7.1+ and iOS 8+ in terms of browser storage.

Updated May 25th 2016

Safari (general)

@rwjblue
rwjblue / ember-master-in-ember-cli-app.md
Last active October 10, 2016 23:01
Developing on Ember master (linked locally), with an Ember CLI application.

From a terminal run the following commands:

git clone git@github.com:emberjs/ember.js
cd ember.js
npm install
npm start

While that is running open another terminal and run the following (starting from the ember.js folder you cloned a moment ago):

@krisselden
krisselden / index.hbs
Created April 25, 2014 06:01
sortable-list component example
{{#each fruits}}
{{this}}
{{/each}}
{{draggable-list values=fruits}}
@sebastianseilund
sebastianseilund / merged_array.js
Last active December 20, 2015 07:58
An implementation of a merged array in Ember.js that combines items from multiple source arrays so you can easily list them together in your Handlebars templates. Read the blog post at the [Billy's Billing Developer Blog](http://dev.billysbilling.com/blog/How-to-merge-multiple-data-sources-into-one-array-in-Ember-js)
/**
* `Ember.MergedArray` is an array that observes multiple other arrays (called source arrays) for changes and includes
* all items from all source arrays in an efficient way.
*
* Usage:
*
* ```javascript
* var obj = Ember.Object.create({
* people: [
* {
@jfromaniello
jfromaniello / gist:4087861
Last active February 6, 2022 03:53
socket-io.client send the cookies!
/*
* Little example of how to use ```socket-io.client``` and ```request``` from node.js
* to authenticate thru http, and send the cookies during the socket.io handshake.
*/
var io = require('socket.io-client');
var request = require('request');
/*
* This is the jar (like a cookie container) we will use always
@go1dfish
go1dfish / array_filter.js
Created October 2, 2012 02:45
Ember.js ArrayProxy based ArrayFilter implementation
Ember.ArrayFilter = Em.ArrayProxy.extend({
init: function() {
this._filterContentDidChange();
this._super();
},
arrangedContent: function() {
var af = this;
return Ember.ArrayFilterSortProxy.create({
arrayFilter: af,
@runspired
runspired / timelineManager.js
Created September 7, 2012 03:27
Twitter Timeline Manager
/*
This javascript closure will create a timeline manager to let you filter
out users and keywords from your stream. In theory it stores the info
in a cookie for one day, but cookie setting appears to be not working currently.
The manager object has methods for showing a hidden username or keyword,
but currently no buttons to do so.
Keyword filtration is case sensitive and is done based on a single string
match on the tweet's content, it does not match usernames that might
@runspired
runspired / garmin2nike
Last active October 9, 2015 14:57
Demonstration of how to port your Garmin Connect data to Nike+ using http://www.awsmithson.com/tcx2nikeplus/ If you have any questions, feel free to tweet me @runspired
/*
As of 5/13/2013 3:06PM Central Time this script is working. Tweet @runspired to report malfunctions.
*/
/*
Use the Javascript console in Google Chrome and the tcx2nikeplus converter located here: http://www.awsmithson.com/tcx2nikeplus/
This will take some time to run but will port all of your garmin data to nike+.
@strogonoff
strogonoff / middleware.py
Created November 16, 2011 08:56
Django middleware for cross-domain XHR. WARNING: Defaults are unsafe here. Make sure to set proper restrictions in production!
from django import http
try:
from django.conf import settings
XS_SHARING_ALLOWED_ORIGINS = settings.XS_SHARING_ALLOWED_ORIGINS
XS_SHARING_ALLOWED_METHODS = settings.XS_SHARING_ALLOWED_METHODS
XS_SHARING_ALLOWED_HEADERS = settings.XS_SHARING_ALLOWED_HEADERS
XS_SHARING_ALLOWED_CREDENTIALS = settings.XS_SHARING_ALLOWED_CREDENTIALS
except AttributeError:
XS_SHARING_ALLOWED_ORIGINS = '*'