Skip to content

Instantly share code, notes, and snippets.

View simonexmachina's full-sized avatar

Simon Wade simonexmachina

  • Melbourne, Australia
View GitHub Profile
@simonexmachina
simonexmachina / changes.diff
Last active August 29, 2015 14:04
token-auth adapter
diff --git a/modules/token-auth/models/UserInterface.js b/modules/token-auth/models/UserInterface.js
index ff14924..39e88a1 100644
--- a/modules/token-auth/models/UserInterface.js
+++ b/modules/token-auth/models/UserInterface.js
@@ -44,3 +44,17 @@ UserInterface.findByUsername = function(username) {};
@return Promise A promise that yields an instance
*/
UserInterface.findById = function(id) {};
+
+/**
[email protected] node_modules/ember-cli/node_modules/bower/node_modules/junk
[email protected] node_modules/ember-cli/node_modules/bower/node_modules/stringify-object
[email protected] node_modules/ember-cli/node_modules/bower/node_modules/chalk/node_modules/supports-color
[email protected] node_modules/ember-cli/node_modules/bower/node_modules/update-notifier/node_modules/configstore/node_modules/object-assign
npm WARN unmet dependency /Users/simonwade/Temp/npm-test/node_modules/ember-cli/node_modules/bower/node_modules/bower-json requires graceful-fs@'~2.0.0' but will load
npm WARN unmet dependency undefined,
npm WARN unmet dependency which is version undefined
[email protected] node_modules/ember-cli/node_modules/bower/node_modules/bower-json/node_modules/intersect
[email protected] node_modules/ember-cli/node_modules/bower/node_modules/insight/node_modules/request/node_modules/http-signature/node_modules/assert-plus
npm WARN unmet dependency /Users/simonwade/Temp/npm-test/node_modules/ember-cli/node_mod
@simonexmachina
simonexmachina / README.md
Last active August 29, 2015 14:06
offlien-data readme

offline-data

A general-purpose, minimal solution for offline-first data access.

This module consists of two components for achieving offline capability, a DataCache for reads and an UpdateQueue for writes:

  • DataCache is a cache for HTTP (GET) data, backed by a PouchDB database that's continuously synced from a remote master database so that the cache contains all your data when you're offline.
  • UpdateQueue is a persistent queue for HTTP (POST and PUT) requests that will handle queing requests to the server and sending them when a connection becomes available.

DataCache

@simonexmachina
simonexmachina / app.css.map
Created October 20, 2014 09:43
Source map example
{
"version": 3,
"file": "dashboard.css",
"sources": ["..\/..\/..\/app\/styles\/app.scss","..\/..\/..\/bower_components\/foundation\/scss\/foundation\/_functions.scss","..\/..\/static_compiler-tmp_dest_dir-cDHiEGco.tmp\/attic\/_variables.scss","..\/..\/static_compiler-tmp_dest_dir-cDHiEGco.tmp\/attic\/_foundation-settings.scss","..\/..\/..\/bower_components\/foundation\/scss\/foundation\/components\/_grid.scss","..\/..\/..\/bower_components\/foundation\/scss\/foundation\/components\/_accordion.scss","..\/..\/..\/bower_components\/foundation\/scss\/foundation\/components\/_alert-boxes.scss","..\/..\/..\/bower_components\/foundation\/scss\/foundation\/components\/_block-grid.scss","..\/..\/..\/bower_components\/foundation\/scss\/foundation\/components\/_buttons.scss","..\/..\/..\/bower_components\/foundation\/scss\/foundation\/components\/_dropdown.scss","..\/..\/..\/bower_components\/foundation\/scss\/foundation\/components\/_dropdown-buttons.scss","..\/..\/..\/bower_components\/foundation\/scss\/foundati
@simonexmachina
simonexmachina / order-states.yaml
Last active August 29, 2015 14:11
Edits can be made here: http://code.stypi.com/aexmachina/order-states (but Stypi doesn't support YAML syntax)
root:
initialState: unpaid
actions:
- recomputeState() # throws Exception if 0 > paid || paid > total
# see comments on states below
- addItem(item) # then recomputeState
- payment(amount) # then recomputeState
- refund(amount[, transaction]) # then recomputeState
# if refunding line items then refund amount may be computed from
# adjustedTotal, and do we care what items a manual discount

Franq Change Notifications

Server-side

On PUT, POST or DELETE to an API endpoint:

  • Get the next tid counter value from Redis
  • Emit an event in the changes channel of Socket.io:

{ name: 'create|update|delete',

@simonexmachina
simonexmachina / unbork-arraycomputed-reducecomputed.js
Last active August 29, 2015 14:11
Alternative implementations of some Ember.computed functions to avoid issues with broken ArrayComputed and ReduceComputed
Em.computed.map = function(key, callback) {
return Em.computed(key + '.[]', function() {
return Em.get(this, key).map(callback.bind(this));
});
};
Em.computed.mapBy = function(key, property) {
return Em.computed(key + '.@each.' + property, function() {
return Em.get(this, key).mapBy(property);
});
@simonexmachina
simonexmachina / dashboard.map.correct.json
Created February 6, 2015 11:00
ember-cli source maps
This file has been truncated, but you can view the full file.
{"version":3,"sources":["dashboard/app.js","dashboard/components/accordion-button.js","dashboard/components/accordion-container.js","dashboard/components/accordion-header.js","dashboard/components/accordion-item.js","dashboard/components/acl-create-button.js","dashboard/components/acl-delete-link.js","dashboard/components/acl-edit-link.js","dashboard/components/acl-link.js","dashboard/components/action-buttons.js","dashboard/components/address-locator.js","dashboard/components/address-select.js","dashboard/components/autocomplete-input.js","dashboard/components/bread-crumbs.js","dashboard/components/change-input.js","dashboard/components/color-palette.js","dashboard/components/color-picker.js","dashboard/components/confirm-action-mixin.js","dashboard/components/confirm-action.js","dashboard/components/confirm-input.js","dashboard/components/confirm-popover.js","dashboard/components/drag-spacer.js","dashboard/components/ember-notify.js","dashboard/components/ember-spinner.js","dashboard/components/event-delega
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC9NsGqgmJObGpNOnv7i3dC44EEFXVx4hgZd26Basewc9DF51xbD3jImykrp4lA/k6QAJvv1tKapMK5V3CX07WIr4AJiSR73MM/27qDkIPsOjurC/9wtOdgZ8wl9O/bZlwJCLGCapNaqkePHba/x0hdSgIqN2+XR8wauahyJaN+SQ0x6uSLG033htnC8mu3VfHRWeqB79EHW6WiodvP8g5QSUfzwNHqeX+FwWxEUnpzCJ/DOvNKNmSvr+wn2su1PRMDgsOwP1jIpPzbv76h63VZub2FUrWjpuKey4PmM7nrCNeUYzAmD5yPPiuNUd0pp8k6NFq5MxGOUFpDlcPuLxdX [email protected]
@simonexmachina
simonexmachina / .gitignore
Last active October 24, 2019 05:44
Example .gitignore file for iOS projects
## Build generated
build/
DerivedData
build.xcarchive
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3