text before code block
Code block without syntax highlighting
blah blah
# Code block without syntax highlighting
# Which date range(s) must sanctorale of each Liturgia horarum volume cover? | |
require 'calendarium-romanum/cr' | |
years = 1971 .. 3000 | |
dates = CR::Temporale::Dates | |
xviii_sunday = lambda do |y| | |
dates.first_advent_sunday(y + 1) - |
require 'calendarium-romanum/cr' | |
require 'set' | |
require 'colorize' | |
require 'optparse' | |
MEMORIALS_WITH_FESTAL_PSALMS = Set.new(%i[ | |
agnes | |
baptist_beheading | |
bvm_sorrows | |
guardian_angels |
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 |
# 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}:" |
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| |
text before code block
Code block without syntax highlighting
blah blah
# Code block without syntax highlighting
# 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 |
<?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'; |
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.
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 |