Skip to content

Instantly share code, notes, and snippets.

@toddgeist
toddgeist / jsonCfs
Last active August 29, 2015 14:16
jsonCFs Example
jsonO (
jsonOp ( "firstName" ; "Todd" ) & jsonOp ( "lastName" ; "Geist" ) &
jsonOp (
"pets" ;
jsonA (
jsonAv (
jsonO ( jsonOp ( "species" ; "dog" ) & jsonOp ( "name" ; "Kona" ) )
) &
jsonAv (
jsonO ( jsonOp ( "species" ; "dog" ) & jsonOp ( "name" ; "Alfie" ) )
@toddgeist
toddgeist / ContactController.js
Last active August 29, 2015 14:24
Running a FileMaker Script with sails-filemaker
/**
* ContactController
*
* @description :: Server-side logic for managing Contacts
* @help :: See http://sailsjs.org/#!/documentation/concepts/Controllers
*/
module.exports = {
/**
@toddgeist
toddgeist / QuickbooksOnlineRetainerReport.js
Last active October 29, 2015 17:39
Getting Retainer Report Data from Quickbooks Online
/*
gets each customer with a postive balance in the Retainer Account
check the endDate Below
*/
var QuickBooks = require('node-quickbooks');
var numeral = require('numeral')
var retainerAccountID = 93; // your account id maybe different
var options = {
@toddgeist
toddgeist / ConnectToQuickbooksOnlineButton.jsx
Created January 30, 2016 19:06
React Component to show ConnectTo Quickbooks Online Button
import React, { PropTypes } from 'react';
/**
* Connect to QBO Button
* @param props
* @returns {XML}
*/
const ConnectToQuickBooksOnlineButton = (props)=>{
const {callbackURL} = props;
@toddgeist
toddgeist / app.js
Last active April 15, 2016 14:24
feathers.js server composition ( sort of )
// src/app.js
const path = require('path');
const serveStatic = require('feathers').static;
const favicon = require('serve-favicon');
const compress = require('compression');
const cors = require('cors');
const feathers = require('feathers');
const configuration = require('feathers-configuration');
const hooks = require('feathers-hooks');
@toddgeist
toddgeist / start.js
Created June 7, 2016 17:14
Using dotenv to load vars when dploying to now. But still keep it out of your repo.
// load as early as possible
if(process.env.NOW){
require('dotenv').config({path:'./.envnow', silent:true});
}else{
require('dotenv').config({silent:true});
}
// now you can deploy with:
//$cp .env .envnow && now && rm -r .envnow