Skip to content

Instantly share code, notes, and snippets.

@shoemaker
shoemaker / coffee.js
Created January 29, 2016 19:57
Coffee for Hubot
// Description:
// Listens for coffee-related strings and chimes in with quotes and coffee shop suggestions.
// Dependencies:
// none
// Configuration:
// HUBOT_FOURSQUARE_CLIENTID - A Foursquare client ID.
// HUBOT_FOURSQUARE_CLIENTSECRET - A foursquare client secret.
// HUBOT_FOURSQUARE_LATLONG - The latitude and longitude of your location, for coffee shop suggestions. Format: 44.9789949,-93.2717354
@shoemaker
shoemaker / Dockerfile + Node.js Examples
Last active August 30, 2016 13:02
Dockerfile + Node.js Examples
Dockerfile + Node.js Examples

Keybase proof

I hereby claim:

  • I am shoemaker on github.
  • I am shoemaker (https://keybase.io/shoemaker) on keybase.
  • I have a public key whose fingerprint is 36D2 8844 9F2E CE02 D5B8 7FAA A351 FEDD D419 6633

To claim this, I am signing this object:

@shoemaker
shoemaker / responsiveBackground.html
Created November 11, 2013 19:23
Responsive background image sandbox.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Responsive Background Sandbox</title>
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
body {
@shoemaker
shoemaker / bootstrap-fluid-container
Created September 8, 2013 21:26
Bootstrap 3 "fluid" container. Bootstrap 3 uses a max-width for each breakpoint. To allow your site to use the full width of the browser (like in 2.x) use this fluid-container class in place of the default container class in v3.
.fluid-container {
margin-left: auto;
margin-right: auto;
padding-left: 15px;
padding-right: 15px;
}
@shoemaker
shoemaker / router.js
Last active December 20, 2015 11:19
An example "router" for a web server hosting several Node.js apps. In this scenario. I run each application on a different port, using pm2 to keep the process running and watching for changes. The router determines the desired application based on the URL, and then forwards the request to the correct app/port. Static files are served up using Ex…
// https://github.com/nodejitsu/node-http-proxy
// https://github.com/visionmedia/express
var httpProxy = require('http-proxy'),
express = require('express'),
app = express();
var PATH_REGEX = /^\/([a-zA-Z0-9]+).*$/;
// Create a proxy server with custom application logic.