<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>
-
URL
<The URL Structure (path only, no root url)>
-
Method:
| FROM ubuntu:trusty | |
| RUN \ | |
| apt-get update \ | |
| && apt-get -y install gettext-base \ | |
| && apt-get clean \ | |
| && rm -rf /var/lib/apt/lists/* | |
| ENV VALUE=foo | |
| ENV VALUE1=boo | |
| COPY config.txt source_config.txt |
| # Make sure the ngx_http_stub_status_module is installed correctly. | |
| location /status { | |
| add_header Content-Type application/json; | |
| return 200 '{\r | |
| "connections_active": $connections_active,\r | |
| "connections_reading": $connections_reading,\r | |
| "connections_writing": $connections_writing,\r | |
| "connections_waiting": $connections_waiting | |
| }'; | |
| } |
| from flask import abort, make_response, jsonify | |
| abort(make_response(jsonify(message="Message goes here"), 400)) |
| import copy | |
| from cerberus import Validator | |
| from cerberus import errors | |
| from collections import Mapping, Sequence | |
| class ObjectValidator(Validator): | |
| def __init__(self, *args, **kwargs): |
| #!/bin/bash | |
| # replace config | |
| REMOTEUSER="luiscoms" | |
| REMOTEHOST="example.com" | |
| # generate ssh key if not exits | |
| if [ ! -f ~/.ssh/id_dsa.pub ];then | |
| ssh-keygen -t dsa | |
| fi |
| [user] | |
| name = Luis Fernando Gomes | |
| email = [email protected] | |
| [core] | |
| ignorecase = false | |
| [push] | |
| default = current |
| # in ~/.s3cfg | |
| # modify host_base and host_bucket to the proper endpoints | |
| host_base = s3-ap-southeast-1.amazonaws.com | |
| host_bucket = %(bucket)s.s3-ap-southeast-1.amazonaws.com |
| wget --no-check-certificate --content-disposition https://github.com/joyent/node/tarball/v0.7.1 | |
| # --no-check-cerftificate was necessary for me to have wget not puke about https | |
| curl -LJO https://github.com/joyent/node/tarball/v0.7.1 |
| // Example: | |
| JavaScript.load("/javascripts/something.js"); | |
| // With callback (that’s the good thing): | |
| JavaScript.load("http://www.someawesomedomain.com/api.js", function() { | |
| API.use(); // or whatever api.js provides ... | |
| }); |