Skip to content

Instantly share code, notes, and snippets.

View jerzyn's full-sized avatar

Andrzej Jarzyna jerzyn

  • PZU
View GitHub Profile
@jerzyn
jerzyn / verify-dns.sh
Created March 31, 2014 10:12
Use the following DIG statements from the command line to verify that your DNS changes are correctly implemented:
dig cname APIMAIL.YOURDOMAIN.com
# should return "sendgrid.net"
dig cname smtpapi._domainkey.YOURDOMAIN.com
# should return "dkim.sendgrid.net"
dig cname smtpapi._domainkey.APIMAIL.YOURDOMAIN.com
# should return "dkim.sendgrid.net"
dig a o1.APIMAIL.YOURDOMAIN.com
@jerzyn
jerzyn / nginx-install-dependencies.sh
Created March 31, 2014 10:27
For Debian/Ubuntu linux distribution you should install the following packages using apt-get:
sudo apt-get install libreadline-dev libncurses5-dev libpcre3 libpcre3-dev libssl-dev perl
sudo apt-get build-dep nginx
@jerzyn
jerzyn / nginx-compile-install.sh
Created March 31, 2014 10:30
Download the code and compile it,
wget http://agentzh.org/misc/nginx/ngx_openresty-VERSION.tar.gz
tar -zxvf ngx_openresty-VERSION.tar.gz
cd ngx_openresty-VERSION/
./configure --prefix=/opt/openresty --with-luajit --with-http_iconv_module -j2
make
make install
@jerzyn
jerzyn / nginx-change-server.conf
Created March 31, 2014 10:31
You should change the server directive from your sandbox endpoint (typically xxx.yyy.proxy.3scale.net) to your new developer frontend on your own domain.
server {
listen 80;
server_name XXX.YYY.proxy.3scale.net;
underscores_in_headers on;
...
}
@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
@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 / 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 / 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 / css-path.css
Created March 31, 2014 11:02
Modify system pages
#three-scale .dashboard_bubble
@jerzyn
jerzyn / subscribe-link.html
Created March 31, 2014 11:06
Multi service signup