For excessively paranoid client authentication.
Organization & Common Name: Some human identifier for this server CA.
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
For excessively paranoid client authentication.
Organization & Common Name: Some human identifier for this server CA.
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
| server { | |
| #listen 80; ## listen for ipv4; this line is default and implied | |
| #listen [::]:80 default ipv6only=on; ## listen for ipv6 | |
| server_name media.resize.dev; | |
| error_log /var/log/nginx/debug.log debug; | |
| log_subrequest on; | |
| rewrite_log on; |
| /* | |
| * Example how to preload HTML5 video on the iPad (iOS 3.2+) | |
| * @author Miller Medeiros | |
| * Released under WTFPL | |
| */ | |
| var vid = document.createElement('video'); | |
| vid.src = 'lol_catz.mp4'; | |
| document.getElementById('video-holder').appendChild(vid); |
| # Feel free to change this path of course (and keys_zone value as well, but also change the usage of it below). | |
| proxy_cache_path /var/www/cache/resized levels=1:2 keys_zone=resizedimages:10m max_size=1G; | |
| # Gzip was on in another conf file of mine...You may need to uncomment the next line. | |
| #gzip on; | |
| gzip_disable msie6; | |
| gzip_static on; | |
| gzip_comp_level 4; | |
| gzip_proxied any; | |
| # Again, be careful that you aren't overwriting some other setting from another config's http {} section. |
| # | |
| # Slightly tighter CORS config for nginx | |
| # | |
| # A modification of https://gist.github.com/1064640/ to include a white-list of URLs | |
| # | |
| # Despite the W3C guidance suggesting that a list of origins can be passed as part of | |
| # Access-Control-Allow-Origin headers, several browsers (well, at least Firefox) | |
| # don't seem to play nicely with this. | |
| # |
| - certain endpoints are always blocked | |
| if nginx_uri == "/_access_token" or nginx_uri == "/_me" then | |
| ngx.exit(403) | |
| end | |
| -- import requirements | |
| local cjson = require "cjson" | |
| -- setup some app-level vars | |
| local app_id = "APP_ID" |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| text text text text | |
| text text text text | |
| text text text text | |
| text text text text | |
| [image=928340923] | |
| text text text text | |
| text text text text | |
| text text text text |
| function formatSecondsAsTime(secs, format) { | |
| var hr = Math.floor(secs / 3600); | |
| var min = Math.floor((secs - (hr * 3600))/60); | |
| var sec = Math.floor(secs - (hr * 3600) - (min * 60)); | |
| if (hr < 10) { hr = "0" + hr; } | |
| if (min < 10) { min = "0" + min; } | |
| if (sec < 10) { sec = "0" + sec; } | |
| if (hr) { hr = "00"; } |
| var express = require('express'); | |
| var http = require('http'); | |
| var path = require('path'); | |
| var request = require('request'); | |
| var $ = require('cheerio'); | |
| var WSJ_PRIME_URL = 'http://www.bankrate.com/rates/interest-rates/wall-street-prime-rate.aspx'; | |
| var app = express(); |