Skip to content

Instantly share code, notes, and snippets.

View mark-stephenson-'s full-sized avatar

Mark Stephenson mark-stephenson-

View GitHub Profile
Index.js (custom action)
-------------------------
activate_schedule({sessionId, context, entities}) {
return new Promise(function(resolve, reject) {
LevelUp.set_activation_state(sessions[sessionId].fbid, true)
.then(user_schedule => {
console.log(user_schedule);
// if(user_schedule.schedule_on){
// context.schedule_active= true;
// delete context.schedule_inactive;
@mark-stephenson-
mark-stephenson- / index.js
Created December 21, 2016 14:43
Node WIT/FB Index
'use strict';
const bodyParser = require('body-parser');
const crypto = require('crypto');
const express = require('express');
const fetch = require('node-fetch');
const request = require('request');
const config = require('./config');
const LevelUp = require('./lib/levelup').LevelUp;
@mark-stephenson-
mark-stephenson- / index.js
Last active June 2, 2017 08:28
Wit Promise Issue
'use strict';
let Wit = null;
let log = null;
try {
// if running from repo
Wit = require('./lib/wit');
log = require('./lib/log');
} catch (e) {
console.log('2');
Demo Card State
main*
lets do it -> doitmain
ill do it -> diymain
doitmain
do it for me -> jomain
ill do it -> diymain
jomain
import { mount } from 'enzyme';
import toJSON from 'enzyme-to-json';
import wait from 'waait';
import Nav from '../components/Nav';
import { CURRENT_USER_QUERY } from '../components/User';
import { MockedProvider } from 'react-apollo/test-utils';
import { fakeUser, fakeCartItem } from '../lib/testUtils';
const notSignedInMocks = [
{