Skip to content

Instantly share code, notes, and snippets.

@rhfung
rhfung / index.html
Last active January 4, 2016 21:49
Focus+Context Bar Graph using D3, Crossfilter, and DC http://www.techsfo.com/blog/2013/08/focus-context-bar-chart-in-javascript/
<!DOCTYPE html>
<meta http-equiv="content-type" content="text/html; charset=UTF8">
<html>
<head>
<title></title>
<link href="http://www.techsfo.com/js/dc.js/v1.4.0/dc.css" rel='stylesheet' type="text/css">
</head>
<body>
<div id="monthly-move-chart"></div>
<div id="monthly-volume-chart"></div>
@rhfung
rhfung / nginx-cors.conf
Last active January 8, 2019 13:41 — forked from algal/nginx-cors.conf
nginx configuration for CORS (Cross-Origin Resource Sharing), with an origin whitelist, and HTTP Basic Access authentication allowed
#
# A CORS (Cross-Origin Resouce Sharing) config for nginx
#
# == Purpose
#
# This nginx configuration enables CORS requests in the following way:
# - enables CORS just for origins on a whitelist specified by a regular expression
# - CORS preflight request (OPTIONS) are responded immediately
# - Access-Control-Allow-Credentials=true for GET and POST requests
# - Access-Control-Max-Age=20days, to minimize repetitive OPTIONS requests