Skip to content

Instantly share code, notes, and snippets.

@dhritzkiv
dhritzkiv / index.js
Created July 21, 2015 22:15
requirebin sketch
var View = require("ampersand-view");
var CustomView = View.extend({
initialize: function() {
this.on("remove", function() {
this.el.innerHTML = "I was removed??"
});
}
});
@dhritzkiv
dhritzkiv / index.js
Created July 31, 2015 20:30
requirebin sketch
var rfc6902 = require("rfc6902");
var starting = {
arr: []
};
var goal = {
arr: [1,2,3,4,5,6]
};
var diff = rfc6902.createPatch(starting, goal);
@dhritzkiv
dhritzkiv / index.js
Created August 19, 2015 19:53
requirebin sketch
var sync = require("ampersand-sync");
var xhr = require("xhr");
var options = {
url: 'http://jsonplaceholder.typicode.com/posts',//a test endpoint
headers: {
"Content-Type": "application/json"
},
json: {
foo: "bar"
@dhritzkiv
dhritzkiv / .jscrc
Created December 11, 2015 16:29
jcsrc for debugging --fix
{
"excludeFiles": ["node_modules/**"],
"esnext": true,
"requireCurlyBraces": [
"if",
"else",
"for",
"while",
"do",
"try",
@dhritzkiv
dhritzkiv / response.json
Created June 28, 2016 16:57
QBO ExchangeRate Query Response
{
"Fault": {
"Error": [
{
"Message": "An application error has occurred while processing your request",
"Detail": "System Failure Error: An unexpected error occurred while accessing or saving your data. Please wait a few minutes and try again. If the problem persists, contact customer support.",
"code": "10000"
}
],
"type": "SystemFault"