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
// Run Inspector Console in chrome and copy and paste the following code in the /stats/stories view | |
function download(filename, text) { | |
var pom = document.createElement('a'); | |
pom.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)); | |
pom.setAttribute('download', filename); | |
if (document.createEvent) { | |
var event = document.createEvent('MouseEvents'); | |
event.initEvent('click', true, true); |
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
name: Deploy API Documentation | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy-doc-apiary: | |
name: Push API doc to Apiary |
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
# .... | |
gem 'versionist' | |
gem 'jwt' | |
# .... |
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
#!/bin/bash +x | |
set -e | |
# Remove unnecessary files | |
echo -e "\033[34mRemoving unnecessary files...\033[0m" | |
rm -f log/*.log &> /dev/null || true &> /dev/null | |
rm -rf public/uploads/* &> /dev/null || true &> /dev/null | |
# Build Project | |
echo -e "\033[34mBuilding Project...\033[0m" |
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
var gulp = require('gulp'), | |
awspublish = require('gulp-awspublish'); | |
var localConfig = { | |
buildSrc: './build/**/*', | |
getAwsConf: function (environment) { | |
var conf = require('../../config/aws'); | |
if (!conf[environment]) { | |
throw 'No aws conf for env: ' + environment; | |
} |
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
// Max value of the Minutes Read Graph | |
minutesReadMaxAxis = 810 | |
// Max value of the Views Graph | |
viewsMaxAxis = 431 | |
// Max value of the Visitors Graph | |
visitorsMaxAxis = 344 | |
// First date of the graph (US Format) | |
initialDay = new Date('12/22/2016') | |
// Days in the graphs |
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
#!/bin/bash +x | |
docker-compose --project-name=${JOB_NAME} stop &> /dev/null || true &> /dev/null | |
docker-compose --project-name=${JOB_NAME} rm --force &> /dev/null || true &> /dev/null | |
docker stop `docker ps -a -q -f status=exited` &> /dev/null || true &> /dev/null | |
docker rm -v `docker ps -a -q -f status=exited` &> /dev/null || true &> /dev/null | |
docker rmi `docker images --filter 'dangling=true' -q --no-trunc` &> /dev/null || true &> /dev/null |
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
db: | |
image: postgres | |
ports: | |
- "5432" | |
redis: | |
image: redis | |
ports: | |
- "6379" | |
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
<RoutingRules> | |
<RoutingRule> | |
<Condition> | |
<HttpErrorCodeReturnedEquals>404</HttpErrorCodeReturnedEquals> | |
</Condition> | |
<Redirect> | |
<HostName>your-app-dns</HostName> | |
<Protocol>https</Protocol> | |
<ReplaceKeyPrefixWith>#/</ReplaceKeyPrefixWith> | |
</Redirect> |
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
# Original: http://www.snip2code.com/Snippet/256399/Amazon-Elastic-Beanstalk-Sidekiq | |
commands: | |
create_pre_dir: | |
command: "mkdir /opt/elasticbeanstalk/hooks/appdeploy/pre" | |
ignoreErrors: true | |
create_post_dir: | |
command: "mkdir /opt/elasticbeanstalk/hooks/appdeploy/post" | |
ignoreErrors: true | |
create_restartappserver_pre_dir: | |
command: "mkdir /opt/elasticbeanstalk/hooks/restartappserver/pre" |
NewerOlder