Skip to content

Instantly share code, notes, and snippets.

View nsbingham's full-sized avatar

Nathan Bingham nsbingham

  • optional
  • United States
View GitHub Profile
@nsbingham
nsbingham / index.html
Created March 2, 2016 18:26
number-guessing-exercise
<p id="message">Guess a number between 1 and 10</p>
<form id="input">
<input type="text" name="number" id="guess">
<button id="submit">Submit</button>
</form>
<button id="replay" class="hidden">Replay</button>
# Number-guessing
- Write the `init` function to set up an event listener on the form. The event listener should pass the value of the input element to the `check` function.
@nsbingham
nsbingham / header.html
Created July 15, 2015 18:04
Example of active state navigation in Jekyll
<nav class="masthead-nav">
<a class="{% if page.title == "About" %}active {% endif %}tooltipped tooltipped-s" href="{{ site.baseurl }}/about" aria-label="About this site.">About</a>
<a class="{% if page.title == "Process" %}active {% endif %}tooltipped tooltipped-s" href="{{ site.baseurl }}/process" aria-label="Working with us.">Process</a>
<a class="{% if page.title == "Capabilities" %}active {% endif %}tooltipped tooltipped-s" href="{{ site.baseurl }}/capabilities" aria-label="What we can do.">Capabilities</a>
<a class="{% if page.title == "Team Docs" %}active {% endif %}tooltipped tooltipped-s" href="{{ site.baseurl }}/team-docs" aria-label="How we do what we do.">Team Docs</a>
<a class="{% if page.title == "Project Leads" %}active {% endif %}tooltipped tooltipped-s" href="{{ site.baseurl }}/project-leads" aria-label="Who's leading your project?">Project Leads</a>
</nav>
@nsbingham
nsbingham / Rakefile
Created June 30, 2015 15:08
Jekyll/HTML Proofer Rakefile
# https://github.com/gjtorikian/html-proofer
# Add `gem 'html-proofer'` to your Gemfile
# Run `bundle`
# Create a file named `Rakefile`
# Paste the code below in it
# Run `rake test` from the commandline. Issues will be reported.
require 'html/proofer'
task :test do
@nsbingham
nsbingham / local-dnsserver.md
Last active June 5, 2023 21:44
Testing a CNAME

Setting up a local DNS server with bind on OSX Mavericks

This is really just an approach for locally testing DNS changes, which can easily be done with a HOSTS file if the change involves an IP address, but gets a bit trickier when things like CNAMEs are involved. This is only meant to test locally off a single machine.

  1. Install bind using homebrew

    brew install bind

  2. Follow the installation steps to start up bind

Mig Reyes - Web Designer at Basecamp
* Don't be defined by your job title
* Things don't have to be perfect
* Move fast and make ugly things sometimes
Benjamin Dauer - Product Designer NPR
* Working on Pandora for NPR
* The best interfaces are those that you don't notice
* The importance of the human element
@nsbingham
nsbingham / A-Pen-by-Nathan-Bingham.markdown
Created March 15, 2014 20:02
A Pen by Nathan Bingham.
@nsbingham
nsbingham / ngrok-with-IISExpress.md
Last active December 18, 2020 20:29
How to get ngrok working with IISExpress/Visual Studio 2013
  1. Decide on a subdomain to use with ngrok. This makes the whole process easier.
  2. Open up a Command Prompt in Administrator mode and run the following command to register the URL with HTTP.sys replacing "modernie" with your subdomain and ##### with your VisualStudio/IISExpress application's port.
netsh add urlacl url=http://modernie.ngrok.com:##### user=everyone
  1. Edit your applicationhost.config. The easiest way to is start up the site and right-click the IISExpress icon in the System Tray. Click "Show All Applications" and select your website running at localhost:#####. Click the path next to "Config" to open the file in an editor.
  2. Search for you site's <bindings> configuration. The easiest way is to search for *:#####:localhost, which should bring you to the <bindings> section for your site. Edit them to include the following:
user www-data;
worker_processes 1;
error_log /var/log/nginx/error.log;
pid /var/log/nginx/nginx.pid;
events {
worker_connections 1024;
}