Skip to content

Instantly share code, notes, and snippets.

View jtblin's full-sized avatar

Jerome jtblin

  • Atlassian
  • Sydney, Australia
View GitHub Profile
@jtblin
jtblin / coding-exercise-instructions.md
Last active December 30, 2015 18:29
Coding exercise

Coding exercise

Requirements:

  • 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'
@jtblin
jtblin / hubot-rap-genius.coffee
Last active August 29, 2015 14:02
Hubot Rap Genius script
# Description
# Rap Genius client
#
# Author:
# jtblin
rg = require "rapgenius-js"
module.exports = (robot) ->
robot.respond /(rapgenius|rg) (artist|song|explain)? (.*)/i, (msg) ->
@jtblin
jtblin / hubot-hacker-news.coffee
Created June 19, 2014 06:24
Hubot Hacker News script
# 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.
@jtblin
jtblin / udp-loader.go
Last active August 22, 2024 01:34
UDP server performance optimisation
package main
import (
"crypto/rand"
"flag"
"log"
mrand "math/rand"
"net"
"os"
"os/signal"