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
| /* | |
| * Pure CSS aspect ratio with no spacer images or js! :) | |
| */ | |
| body { | |
| width: 36%; | |
| margin: 8px auto; | |
| } | |
| div.stretchy-wrapper { |
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 { clone } from "lodash"; | |
| type KVTransformer<T> = (path: string, value: T) => T; | |
| export interface TransformerOptions { | |
| keyHandler: HandlerConfig; | |
| valueHandlers: HandlerConfig[]; | |
| } | |
| export interface HandlerConfig { |
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 ScheduleSelector from 'react-schedule-selector' | |
| class App extends React.Component { | |
| state = { schedule = [] } | |
| handleChange = newSchedule => { | |
| this.setState({ schedule: newSchedule }) | |
| } | |
| renderCustomDateCell = (time, selected, innerRef) => ( |
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 ScheduleSelector from 'react-schedule-selector' | |
| class App extends React.Component { | |
| state = { schedule = [] } | |
| handleChange = newSchedule => { | |
| this.setState({ schedule: newSchedule }) | |
| } | |
| render() { |
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
| branch-defaults: | |
| production: | |
| environment: mywebapp-api-production | |
| # (optional) Other branch-specific settings | |
| # (e.g. if you want a staging environment) | |
| master: | |
| environment: mywebapp-api-staging | |
| global: | |
| application_name: mywebapp-api | |
| default_ec2_keyname: null |
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 the alpine base image | |
| FROM alpine:3.7 | |
| # Install depedencies | |
| RUN apk update && apk add -U nodejs yarn | |
| RUN node --version | |
| RUN yarn --version | |
| # Create the working directory | |
| RUN mkdir -p /var/www/api |
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
| #!/bin/bash | |
| EB_APP="mywebapp-api" | |
| STAGING_BRANCH="master" | |
| PRODUCTION_BRANCH="production" | |
| # Determine the environment to deploy to based on which branch this commit is on | |
| NODE_ENV='' | |
| if [[ $TRAVIS_BRANCH == $STAGING_BRANCH ]]; then | |
| NODE_ENV="staging" |
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
| sudo: required | |
| language: node_js | |
| node_js: | |
| - node | |
| after_success: | |
| - chmod +x ./deploy.sh | |
| - "./deploy.sh" |
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
| #!/bin/bash | |
| AWS_S3_REGION="us-west-2" | |
| STAGING_BRANCH="master" | |
| PRODUCTION_BRANCH="production" | |
| # Determine the environment to deploy to based on the branch | |
| # From that, we'll know: | |
| # - the S3 bucket to sync assets with | |
| # - the CloudFront distribution for which to create an invalidation |
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
| sudo: required | |
| language: node_js | |
| node_js: | |
| - node | |
| after_success: | |
| - chmod +x deploy.sh | |
| - "./deploy.sh" |
NewerOlder