Skip to content

Instantly share code, notes, and snippets.

View jerzyn's full-sized avatar

Andrzej Jarzyna jerzyn

  • PZU
View GitHub Profile
@jerzyn
jerzyn / swagger2.0.html
Last active August 29, 2015 14:21
Swagger 2.0
<h1>Documentation</h1>
<p>Use our live documentation to learn about Hello World API</p>
{% active_docs version: "2.0" services: "SERVICE_NAME" %}
<script type="text/javascript">
$(function () {
{% comment %}
// you have access to swaggerUi.options object to customize its behaviour
@jerzyn
jerzyn / 0_reuse_code.js
Created August 7, 2014 12:58
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@jerzyn
jerzyn / layout-use-example.html
Created April 29, 2014 14:33
Liquid Formatting Tags HowTo
<!-- if we are inside '/documentation' URL -->
<li class="{% if request.request_uri contains "/documentation" %}active{% endif %}"><!-- add the active class to the menu item -->
<a href="/documentation">Documentation</a>
</li>
@jerzyn
jerzyn / subscribe-link.html
Created March 31, 2014 11:06
Multi service signup
@jerzyn
jerzyn / css-path.css
Created March 31, 2014 11:02
Modify system pages
#three-scale .dashboard_bubble
@jerzyn
jerzyn / sentiment-calls
Created March 31, 2014 10:48
Sentiment Calls
GET /v1/words/{word}.json?app_id={app_id}&app_key={app_key}
POST /v1/words/{word}.json?value={value}&app_id={app_id}&app_key={app_key}
GET /v1/sentence/{sentence}.json?app_id={app_id}&app_key={app_key}
@jerzyn
jerzyn / ad-include.html
Created March 31, 2014 10:43
Active Docs
<script src="/active_docs/application.js" ></script>
<link href="/active_docs/application.css" media="screen" rel="stylesheet" />
<div class='api-docs-wrap'></div>
<script>
$(function(){ ThreeScale.APIDocs.init([]); });
</script>
@jerzyn
jerzyn / nginx-debug-header
Last active August 29, 2015 13:57
Nginx Advanced HowTo
X-3scale-matched-rules: /v1/word/{word}.json, /v1
X-3scale-credentials: app_key=APP_KEY&app_id=APP_ID
X-3scale-usage: usage[version_1]=1&usage[word]=1
@jerzyn
jerzyn / nginx-start.sh
Created March 31, 2014 10:33
Start and stop your API proxy
sudo /opt/openresty/nginx/sbin/nginx -p /opt/openresty/nginx/ -c /opt/openresty/nginx/conf/YOUR-CONFIG-FILE.conf