Related to BaseXdb/basex#1555
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'calendarium-romanum' | |
CR = CalendariumRomanum | |
def passion_week(liturgical_year) | |
easter = CR::Temporale::Dates.easter_sunday liturgical_year | |
((easter - 7) .. (easter - 1)) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'mechanize' | |
require 'csv' | |
blog = 'https://pokus-4.signaly.cz' | |
agent = Mechanize.new | |
agent.log = Logger.new "mech.log" | |
# collect links to all archive pages (each listing blog posts of a single month) | |
page = agent.get blog |
layout | title | url | previous | next |
---|---|---|---|---|
default |
Command Reference |
/command-reference |
/specification-reference |
/rubygems-org-api |
What each gem
command does, and how to use it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$hesla = array( | |
"heslo" => "Tajný text", | |
"jineheslo" => "Jiný tajný text\nse zalomeními\n\nřádků", | |
// "zakomentovaneheslo" => "Pokud řádek neodkomentuješ smazáním dvou lomítek na jeho začátku , tohle heslo je neaktivní.", | |
); | |
$title = 'Hledání jednorožce'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# reads Cantus IDs on stdin, tries to fetch every one from CantusIndex, prints result | |
require 'mechanize' | |
def exists?(cantusid) | |
uri = "http://www.cantusindex.org/id/#{cantusid}" | |
agent = Mechanize.new | |
begin |
text before code block
Code block without syntax highlighting
blah blah
# Code block without syntax highlighting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'calendarium-romanum/cr' | |
sanctorale = CR::Data::GENERAL_ROMAN_ENGLISH.load | |
result = CR::Util::Year.new(2000).each_cons(2).flat_map do |date_a, date_b| | |
cel_a = sanctorale[date_a] | |
cel_b = sanctorale[date_b] | |
if cel_b.size > 0 && cel_b[0].solemnity? && cel_a.size > 0 && cel_b[0].rank > cel_a[0].rank | |
cel_a.collect do |c| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
# accepts https://github.com/igneus/In-adiutorium/blob/master/antifonar/antifonar_zaltar.ltex | |
# as input, prints psalter distribution as YAML | |
started = false | |
ARGF.each_line do |line| | |
case line | |
when /^\\nadpisTyden\{.+?\}\{(\d.+)\}/ | |
started = true | |
puts "#{$1}:" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'calendarium-romanum' | |
dates = CalendariumRomanum::Temporale::Dates | |
years = (1969..3000) | |
has_second_sunday_of_xmas = proc do |year| | |
dates.octave_of(dates.sunday_after(dates.nativity(year))) < | |
dates.epiphany(year) | |
end |