(1000) Days with Elle, and counting

Danilo Moret
moret1979
Published in
2 min readOct 18, 2018

originally published on 2012–07–10 at https://moret1979.wordpress.com/

mirroring up

Hey. Back after a long time. Today I made a quick mental calculation on how long I’ve been with my wife, and it sounded like we were approaching a round number of days. Well, the mental calculation was not enough to satisfy my curiosity then, so I looked for a site that could tell me the days that passed since a certain date. I found some, but none were good looking enough to show to my wife.

The idea hit to make a simple static website and show the dates on style. So I could test two new things I hadn’t before: AWS S3 Web Hosting and Twitter Bootstrap. And later slap some AdSense to it, of course.

Twitter Bootstrap was simpler than I thought. First you download their zip from the website. After you link their CSS`s and JS`s — which is not clear on the website — you can follow their recipes. For the datepicker I used Andrew Rowls adaptation. I still miss a way to have the date always showing on internationalised format, but I can add that later.

I wrote everything with HTML and JS only, so I didn’t need an EC2 instance this time. To host those files on S3 you have to create a bucket with the name of your site, and it must be a subdomain. For example, I had to create a bucket called www.getdays.info instead of just getdays.info . The files on the bucket must be publicly readable. The easiest way to do it is to set a policy on your bucket. Here’s my example:

{
“Version”: “2008–10–17”,
“Statement”: [{
“Sid”: “AllowPublicRead”,
“Effect”: “Allow”,
“Principal”: {
“AWS”: “*”
},
“Action”: “s3:GetObject”,
“Resource”: “arn:aws:s3:::www.getdays.info/*"
}]
}

After that I set up the bucket as a website and pointed my DNS — I use no-ip — to redirect anything to www, and www as a CNAME redirect to the hostname S3 gave me.

That was it. Next month my wife and I will celebrate 1000 days together — a lot longer than just some days of summer.

getdays.info

Links:

Count the days
Twitter Bootstrap
Andrew’s modified Twitter Bootstrap datepicker
(500) Days of Summer

--

--

Danilo Moret
moret1979

I am who I am. Software developer, game player, carioca.