- The web application should have a single web page that has a form input and a button
- When the user enters a valid us zipcode into the form and clicks the button, it should display a page with the city name, state name, and current temperature in fahrenheit.
- If the user puts in an input that is not in the correct format for a zip code (5 numbers) the page should display an error: 'invalid zip code format'
- If the user enters an input that is in the correct format but the zip code does not exist the page should display an error: 'zipcode not found'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description | |
# Rap Genius client | |
# | |
# Author: | |
# jtblin | |
rg = require "rapgenius-js" | |
module.exports = (robot) -> | |
robot.respond /(rapgenius|rg) (artist|song|explain)? (.*)/i, (msg) -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description | |
# Hacker News client | |
# | |
# Author: | |
# jtblin | |
# | |
# Commands: | |
# HN top <n> - Returns Hacker News top n results. | |
# HN search <query> <n> - Searches Hacker News for the query and returns the first n results. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"crypto/rand" | |
"flag" | |
"log" | |
mrand "math/rand" | |
"net" | |
"os" | |
"os/signal" |