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
<?php | |
namespace App\Http; | |
use League\Fractal\Pagination\CursorInterface; | |
use League\Fractal\Pagination\PaginatorInterface; | |
use League\Fractal\Resource\ResourceInterface; | |
use League\Fractal\Serializer\ArraySerializer; | |
class Normalizr extends ArraySerializer |
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
/* | |
|------------------------------------------------------------------------------------ | |
| Normalizing nested API responses, where entities are keyed. As per JSON-API specs | |
|------------------------------------------------------------------------------------ | |
*/ | |
const normalizr = require('normalizr'); | |
const response = { | |
data: { |
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
const normalizr = require('normalizr'); | |
const response = { | |
data: { | |
id: 1, | |
title: 'Lord of the Rings', | |
pages: 9250, | |
publisher: { | |
data: { | |
id: 1, |
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, { Component, PropTypes } from 'react'; | |
import { reduxForm, Field } from 'redux-form'; | |
export class CreateUser extends Component { | |
static propTypes = { | |
createUser: PropTypes.func.isRequired, | |
initialValues: PropTypes.object, | |
submitting: PropTypes.bool.isRequired, | |
invalid: PropTypes.bool.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
export function login(loginHandle, password) { | |
return { | |
types: [LOGIN_REQUEST, LOGIN_SUCCESS, LOGIN_FAILURE], | |
promise: (api) => api.post('/auth/login', { login: loginHandle, password }).then(response => { | |
setAuthCookie(response.token); // side effect pre success dispatch | |
return response; | |
}), | |
then: (response) => { | |
postLoginRedirect(browserHistory.push, response.user, response.organisation); // side effect post success dispatch | |
}, |
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
.... | |
RUNNING | |
started 8 minutes ago | |
CANCEL | |
[info] Pulling image plugins/drone-cache:latest | |
Drone Cache Plugin built from 96d0472 | |
Restoring cache docker/_____/cache-image.tar | |
Unable to restore docker/_____/cache-image.tar. Cache does not exist | |
Restoring cache from master branch |
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
<?php | |
namespace App\Http; | |
use Illuminate\Support\Str; | |
use Dingo\Api\Http\Response\Format\Json as JsonFormatter; | |
/** | |
* Formats json API responses | |
* |
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
load_balancer: | |
image: tutum/haproxy | |
links: | |
- web | |
ports: | |
- "80:80" | |
cache: | |
image: redis |
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
FROM node:5.1.1 | |
#Install AWS CLI | |
RUN apt-get update | |
RUN apt-get install -y python-pip | |
RUN pip install awscli | |
RUN mkdir -p /root/.aws | |
RUN echo '[default]' > /root/.aws/config | |
RUN echo 'output = json' >> /root/.aws/config | |
RUN echo 'region = us-east-1' >> /root/.aws/config |
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 EventEmitter from 'events'; | |
class Store extends EventEmitter { | |
static CHANGE_EVENT = 'change'; | |
constructor() { | |
super(); | |
} |
NewerOlder