Skip to content

Instantly share code, notes, and snippets.

View trafnar's full-sized avatar

Nathan Manousos trafnar

View GitHub Profile
@trafnar
trafnar / web-app.html
Created December 11, 2012 10:14 — forked from tfausak/ios-8-web-app.html
iOS web app icons & startup images
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta content="yes" name="apple-mobile-web-app-capable">
<title></title>
<!-- iPhone -->
<link href="http://taylor.fausak.me/static/images/apple-touch-icon-57x57.png"
require 'linguistics'
# Helper function to pick the correct indefinite article for a number
# e.g. number_with_indefinite_article(10) #=> "a 10"
# e.g. number_with_indefinite_article(80, "$") #=> "an $80"
def number_with_indefinite_article(number, prefix=nil)
if [11,18].include?(number)
article = "an"
elsif number.to_s[0] == "8"
article = "an"