This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
var axios = require('axios'); | |
var args = require('yargs').argv; | |
function help () { | |
process.stdout.write(` | |
This command line utility is used to get the next active target code for blue/green deployments on docker cloud.\n | |
Usage: | |
./getNextTargetCode | |
--user=[username] Docker cloud username. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express') | |
, jwtMiddleware = require('express-jwt') | |
, bodyParser = require('body-parser') | |
, cookieParser = require('cookie-parser') | |
, cors = require('cors'); | |
// We pass a secret token into the NodeJS process via an environment variable. | |
// We will use this token to sign cookies and JWTs | |
var SECRET_TOKEN = process.env.SECRET_TOKEN; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Promise = require('bluebird'); | |
Promise.promisifyAll(City); // creates copies of every function with "Async" suffix... each return a promise | |
Promise.promisifyAll(Category); | |
Promise.all([ | |
City.getAsync(0), | |
Category.getAsync(0) | |
]).then(function (responses) { | |
var cityResponse = responses[0]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { PropTypes } from 'react'; | |
import classNames from 'classnames'; | |
import { autobind } from 'core-decorators' | |
import PureComponent from './pure'; | |
@withStyles(style) | |
export default class Input extends PureComponent { | |
static propTypes = { | |
onChange: PropTypes.func.isRequired, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Location implements Resource { | |
# Primary key | |
id: ID! | |
# Google's name for the Location | |
googleName: String! | |
# Google's ID for the Location | |
googleId: ID! | |
# Google's Place ID for the Location | |
googlePlaceId: ID! | |
# Google's Timezone ID for the Location |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { AlreadyAuthenticatedError, NotAuthenticatedError, NotAuthorizedError } from '../errors/functional'; | |
import createResolver from '../lib/createResolver'; | |
export const baseResolver = createResolver(); | |
export const isAuthenticatedResolver = baseResolver.createResolver( | |
(root, args, context) => { | |
if (!context.user || !context.user.id) throw new NotAuthenticatedError(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { PropTypes } from 'react'; | |
import classNames from 'classnames'; | |
import { autobind } from 'core-decorators'; | |
import withStyles from 'isomorph-style-loader/lib/withStyles'; | |
import PureComponent from '../../components/common/pure'; | |
import style from './radio.css'; | |
@withStyles(style) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
myUser { | |
# My user's ID | |
id | |
name | |
createdAt | |
updatedAt | |
Posts { | |
# Posts that my user has created... | |
id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"redis": { | |
"host": "localhost", | |
"port": 6379, | |
"prefix": "solaris-" | |
}, | |
"port": 3000 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Permissions, Notifications } from 'expo'; | |
import { Platform } from 'react-native'; | |
import client from '../state/apollo'; | |
import mutation from '../graphql/mutations/userAddPushToken'; | |
import Observable from './observable'; | |
export const register = async () => { |