Skip to content

Instantly share code, notes, and snippets.

@bdunnette
bdunnette / nginxproxy.md
Created May 14, 2018 20:08 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@bdunnette
bdunnette / install-watchman.sh
Last active November 28, 2017 10:49 — forked from ivan-loh/install-watchman.sh
Watchman installation for Ubuntu 16.04
# checkout, compile & install
git clone https://github.com/facebook/watchman.git
cd watchman/
# git checkout v4.7.0
sudo apt install -y autoconf automake build-essential python-dev
./autogen.sh
./configure
make
sudo make install
@bdunnette
bdunnette / config.json
Last active June 27, 2016 23:57 — forked from anonymous/config.json
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "#bada55",
"@brand-success": "#5cb85c",
#!/usr/bin/python
#
# Delete the label image from an Aperio SVS file.
#
# Copyright (c) 2012-2013 Carnegie Mellon University
# All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation, version 2.1.
// hacked together aperio support
(function( $ ){
/**
* A client implementation of the Aperio ImageServer Format
*
* @class
* @extends OpenSeadragon.TileSource
* @param {Number|Object} width - the pixel width of the image or the idiomatic
@bdunnette
bdunnette / gist:7901201
Created December 10, 2013 22:11 — forked from sartak/a.md
-- cards are what you review. easy!
CREATE TABLE cards (
id integer primary key,
-- the epoch milliseconds of when the card was created
nid integer not null,
-- notes.id
did integer not null,
-- deck id (available in col table)
ord integer not null,
-- ordinal, seems like. for when a model has multiple templates, or thereabouts
goog.provide('L.SingleTileWMSLayer');
goog.require('L.Map');
L.SingleTileWMSLayer = L.ImageOverlay.extend({
defaultWmsParams: {
service: 'WMS',
request: 'GetMap',
version: '1.1.1',
/*
* L.SingleTile uses L.ImageOverlay to display a single-tile WMS layer.
* url parameter must accept WMS-style width, height and bbox.
*/
L.SingleTile = L.ImageOverlay.extend({
defaultWmsParams: {
service: 'WMS',
request: 'GetMap',
version: '1.1.1',

Create a Meteor app and put the client_/server_ files in a client/server directories. Also, create a public dir to save the uploaded files.

set :application, 'foo'
set :repository, '_site'
set :scm, :none
set :deploy_via, :copy
set :copy_compression, :gzip
set :use_sudo, false
set :host, '127.0.0.1'
role :web, host
role :app, host