View function.json
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
{ | |
"disabled": false, | |
"scriptFile": "../dist/CheckQueues/index.js", | |
"bindings": [ | |
{ | |
"schedule": "*/15 * * * * *", | |
"name": "snapshotSidekiqQueues", | |
"type": "timerTrigger", | |
"direction": "in" | |
} |
View authd_fetch.js
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 _fetch from 'fetch' | |
import Config from '../config/environment'; | |
import Ember from 'ember' | |
export default Ember.Service.extend({ | |
session: Ember.inject.service('session'), | |
fetch(url, options={}) { | |
return new Promise((resolve, reject) => { | |
this.get('session').authorize('authorizer:devise', (headerName, headerContent) => { | |
options = Object.assign({headers: {}}, options) |
View docker.sh
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 | |
sudo apt-get update | |
sudo apt-get -y install apt-transport-https ca-certificates | |
sudo apt-key adv \ | |
--keyserver hkp://ha.pool.sks-keyservers.net:80 \ | |
--recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list | |
sudo apt-get update | |
sudo apt-cache policy docker-engine |
View form.js
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 { Component, h, prop } from 'skatejs'; | |
const React = { createElement: h }; | |
const sym = Symbol(); | |
class WaitlistedForm extends Component { | |
static get is(){ return 'waitlisted-form' } | |
static get props () { | |
return { |
View Caddyfile
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
config_server "https://etcd.local:2379" | |
service users { | |
endpoint: "/users", | |
proxy: "{{services.users.ip}}:{{services.users.port}}" | |
} | |
# In this example 'services.users' would be a directory with a json key for every user service container / application. | |
# Using this we could template the proxy and any other information in the services block, and it would just work with caddy. |
View Php.sh
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 | |
APP_URL=`php -r "print json_decode('$RECEIVE_DATA', 1)[\"push_metadata\"][\"app_info\"][\"web_url\"];"` | |
echo "----> APP URL DETECTED AS: $APP_URL" | |
echo $APP_URL > appurl.txt |
View app.json
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
"scripts": { | |
"postdeploy": "bundle exec rake db:migrate; bundle exec rake db:seed" | |
} |
View deploy.sh
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 | |
docker build -t user/myrepo . && \ | |
docker push user/myrepo && \ | |
ssh docker-web '/opt/utils/upgrade_container.sh' |
View upgrade_container.sh
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 | |
docker pull user/myrepo && \ | |
docker rm -f myapp && \ | |
docker run -d -p 80:80 -e RAILS_ENV=production --env-file=/opt/utils/deps/web.envfile --name=myapp --link=postgres:postgres --link=redis:redis user/myrepo |
View gist:99c1e839d96ad44ce28c
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
https://*.waitlisted.dev { | |
proxy / http://localhost:3000/ | |
tls wldev.cert wldev.key | |
} |
NewerOlder