Skip to content

Instantly share code, notes, and snippets.

@kechol
Created November 1, 2017 04:12
Show Gist options
  • Select an option

  • Save kechol/3097c8c18779b949140b733446db3231 to your computer and use it in GitHub Desktop.

Select an option

Save kechol/3097c8c18779b949140b733446db3231 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require "yaml"
require "open-uri"
d = Date.today; h = YAML.load_file(open("https://raw.githubusercontent.com/holiday-jp/holiday_jp/master/holidays.yml")).keys
exit (1..5).include?(d.wday) && !h.include?(d) ? 0 : 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment