This file contains 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(); | |
} |
This file contains 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 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 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 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 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 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
# create our app directory | |
RUN mkdir -p /var/www | |
# Set it as our working dir | |
WORKDIR /var/www | |
# add our composer dependancies | |
ADD composer.json ./ | |
# install our dependancies without running scripts |
This file contains 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 andrewmclagan/aphex:latest | |
# | |
#-------------------------------------------------------------------------- | |
# Configure | |
#-------------------------------------------------------------------------- | |
# | |
ADD ./nginx.conf /etc/nginx/nginx.conf |
This file contains 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 from12to24(hours, minutes, meridian) { | |
let h = parseInt(hours, 10); | |
const m = parseInt(minutes, 10); | |
if (meridian.toUpperCase() === 'PM') { | |
h = (h !== 12) ? h + 12 : h; | |
} else { | |
h = (h === 12) ? 0 : h; | |
} | |
return new Date((new Date()).setHours(h,m,0,0)); | |
} |
This file contains 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\Services; | |
use Illuminate\Support\Collection; | |
use Illuminate\Database\Eloquent\Model; | |
use Elasticsearch\Client; | |
use App\Models; | |
/** |
OlderNewer