Every day is a day to celebrate! https://everyday.holiday/
  • Ruby 87%
  • Jsonnet 9%
  • Dockerfile 4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nogweii d84f144aec
All checks were successful
ci/crow/push/lint Pipeline was successful
ci/crow/push/container Pipeline was successful
ci/crow/push/deploy Pipeline was successful
app: fail open when the GeoIP database is missing
ip2location_ruby calls Kernel#abort when it cannot open the database, which raises
SystemExit -- not a StandardError -- so the rescue in detect_timezone never fired and
every request from a non-localhost visitor 500'd while the database was absent. Rescue
it explicitly, and skip the lookup when the file is not there so a missing database
does not pay a C-ext open and an abort on every request.

Resolving the path through one method also stops File.absolute_path(nil) blowing up at
boot when IP2LOCATION_DB_PATH is unset.

test_helper touches an empty placeholder so the lookup tests, which stub Geocoder
outright, still look like a host that has the database installed.
2026-11-08 20:02:58 -07:00
.crow clean up comments 2026-11-08 17:03:52 -07:00
db gitkeep db dir 2026-01-24 16:52:32 -07:00
kubernetes k8s: don't let a failed geoip download block startup 2026-11-08 19:38:28 -07:00
LICENSES this is now REUSE compliant 2026-01-24 19:12:09 -07:00
static static folder for assets 2026-01-24 16:57:55 -07:00
test app: fail open when the GeoIP database is missing 2026-11-08 20:02:58 -07:00
.dockerignore kramdown powered about page sourcing from my updated README.md 2026-01-25 08:39:41 -07:00
.env.example a few fixes for production container 2026-01-24 21:38:45 -07:00
.gitignore app: fail open when the GeoIP database is missing 2026-11-08 20:02:58 -07:00
.sops.yaml ci: Crow CI pipelines and an app-template HelmRelease 2026-11-08 15:06:44 -07:00
app.rb app: fail open when the GeoIP database is missing 2026-11-08 20:02:58 -07:00
bot.rb add reuse headers to a bunch of files 2026-01-24 19:04:28 -07:00
celebrate_calendar_banner.png celebrate calendar logo 2026-01-24 16:50:11 -07:00
celebrate_calendar_square.png celebrate calendar logo 2026-01-24 16:50:11 -07:00
Dockerfile create and save the holidays database within the container 2026-01-24 21:55:39 -07:00
Gemfile kramdown powered about page sourcing from my updated README.md 2026-01-25 08:39:41 -07:00
Gemfile.lock kramdown powered about page sourcing from my updated README.md 2026-01-25 08:39:41 -07:00
holidays.sql 3 more fun days to fill out the calendar! 2026-01-24 21:06:12 -07:00
LICENSE add reuse headers to a bunch of files 2026-01-24 19:04:28 -07:00
link_checker.rb add reuse headers to a bunch of files 2026-01-24 19:04:28 -07:00
models.rb handle multiple holidays per sqid 2026-01-25 15:37:35 -07:00
Rakefile raise_for_status in the download script 2026-01-25 15:04:18 -07:00
README.md better document MASTODON_BASE_URL and MASTODON_ACCESS_TOKEN 2026-01-25 15:26:58 -07:00
REUSE.toml this is now REUSE compliant 2026-01-24 19:12:09 -07:00

Every Day Celebration

Every day is a day to celebrate! This website lists fun, wacky, and interesting holidays for every day of the year.

Focused on tech and science, with an American bent.

Whether it's "Talk Like a Pirate Day", "National Pizza Day", or something even more obscure, there's always a reason to find a little joy in the day.

My goal is to provide a simple way to discover these celebrations.

Data is sourced from various public holiday databases and curated to ensure there's at least one celebration for every single day. IP2Location LITE data used to do timezone guessing.


Technical Documentation

Requirements

  • Ruby 4.0+
  • SQLite3
  • Bundler

Installation

  1. Clone the repository.
  2. Install dependencies:
    bundle install
    
  3. Set up environment variables (copy .env.example to .env if available, or set manually):
    • HOLIDAY_DB_PATH: Path to the SQLite database (e.g., db/holidays.sqlite).
    • IP2LOCATION_DB_PATH: Path to the IP2Location LITE database (for geolocation).
    • IP2LOCATION_TOKEN: Token for downloading the IP2Location database.
    • MASTODON_BASE_URL: Protocol and domain (optionally port) of the mastodon server the bot should post to.
    • MASTODON_ACCESS_TOKEN: Application access token. Needs to have write:statuses permission.
    • MASTODON_ACCOUNT_NAME: For the Fediverse link.

Database Setup

Initialize the database with the provided SQL dump:

rake db:reset

To update the GeoIP database (requires IP2LOCATION_TOKEN):

rake geoip:update

Running the Application

Start the web server:

bundle exec ruby app.rb

The application will be available at http://localhost:4567.

Running with Docker

Build the image:

rake docker:build

Run the container:

rake docker:app

Testing

Run the test suite:

bundle exec rake test

Mastodon Bot

There is a bot included to post today's holiday to Mastodon.

rake bot:post

License

This project is licensed under the MPL-2.0.