curl -i -H "Accept: application/json" -X PUT -d "" http://localhost:5984/chatbot/
curl -X GET http://localhost:5984/chatbot/_all_docs?include_docs=true
#!/usr/bin/env node | |
'use strict'; | |
const program = require('commander'); | |
const exec = require('child_process').exec; | |
program |
// setup a middleware that provides access to the express headers | |
module.exports = (req, res, next) => { | |
req.feathers.headers = req.headers; | |
next(); | |
}; |
// Extend from this for a user to get a notification for unsaved model changes | |
// and rollback the model if they choose to navigate away. | |
Ember.DSModelRoute = Ember.Route.extend({ | |
deactivate: function() { | |
var model = this.get('controller.model'); | |
model.rollback(); | |
if (model.get('isNew')) { | |
model.deleteRecord(); | |
} | |
}, |
curl -i -H "Accept: application/json" -X PUT -d "" http://localhost:5984/chatbot/
curl -X GET http://localhost:5984/chatbot/_all_docs?include_docs=true
#!/bin/bash | |
# usage: ./deploy-ecr.sh staging f0478bd7c2f584b41a49405c91a439ce9d944657 | |
BRANCH=$1 | |
SHA1=$2 | |
AWS_ACCOUNT_ID=975486958832 | |
NAME=moovyn | |
EB_BUCKET=moovyn-elasticbeanstalk |
#!/bin/bash | |
# USE | |
# - Save as bulk.sh, then run the commands | |
# - chmod +x bulk.sh | |
# - ./bulk.sh ip_addresses.txt | |
# It reads the ip_address.txt line by line, | |
# does a whois request on each line, and looks | |
# for the term 'netname' in each whois. |
--- | |
# ansible-playbook -i hosts -l production deploy.yml | |
- hosts: production | |
vars: | |
app_root: '/home/ubuntu/app' | |
app_public: "{{app_root}}/public_html" | |
tasks: | |
- synchronize: src=blog dest={{app_public}}/ | |
- copy: src=foobar.txt dest={{app_root}}/ |
[alias] | |
where = log --decorate --pretty=short -n1 | |
lol = log --pretty=oneline --graph --decorate --stat | |
lg = log --all --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ci) %C(bold blue)<%an>%Creset' --abbrev-commit | |
st = status -sb | |
namespace :deploy do | |
desc "Override deploy:cold to include database setup" | |
task :cold do | |
before :run_migrations do | |
capifony_pretty_print "--> Creating database" | |
run "#{release_path}/app/console mygreatdbcommand:database:create-once" | |
capifony_puts_ok | |
end |
<VirtualHost *:80> | |
ServerName foo.kevin.dev | |
ServerAlias foo.local.dev | |
ServerAlias foo.local.test | |
DocumentRoot /home/kevin/projects/foo/web/ | |
<Directory /home/kevin/projects/foo/web/> | |
Options Indexes FollowSymLinks MultiViews | |
# pcw AllowOverride None | |
AllowOverride All |