Skip to content

Instantly share code, notes, and snippets.

View brandwaffle's full-sized avatar

Vasken Hauri brandwaffle

View GitHub Profile
@jeremyfelt
jeremyfelt / proxy-production.conf
Last active May 14, 2019 18:02
Nginx configuration to proxy 404 files locally to a production domain
# Adjust this to include any other necessary files.
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires 24h;
log_not_found off;
try_files $uri $uri/ @production;
}
location @production {
resolver 1.1.1.1;
proxy_pass http://{replace-with.domain.com}/$uri;
// This will create constructed instances that can be easily extended
function Chart( width, height ) {
if ( !(this instanceof Chart) ) {
return new Chart( width || null, height || null );
}
this.width = width || 720;
this.height = height || 80;
// construct your charts here...