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
source 'https://rubygems.org' | |
gem 'rest-client', '1.6.7' | |
gem 'mime-types', '3.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
# having read | |
# https://benmmurphy.github.io/blog/2016/07/11/rails-webconsole-dns-rebinding/ | |
# I wanted to see what http://www.dnsrebinder.net/ would execute | |
# if I had an app with Rails webconsole running on localhost:3000 | |
# Usage: | |
# * run this application | |
# * visit http://www.dnsrebinder.net/ | |
# * watch console |
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
# mididings patch making a single-manual MIDI piano with standard | |
# three piano pedals capable of simple organ music: | |
# * splits keyboard in two manuals (MIDI channels 1, 2) | |
# * transforms the piano pedals in a diatonic | |
# single-octave organ pedal playing on MIDI channel 4 | |
# (it isn't possible to play more simultaneous pedal notes - | |
# combinations are instead used to expand the pedal's range) | |
from mididings import * | |
from mididings.event import CtrlEvent |
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
\header | |
title: Antiphons for the Consecration of Virgins | |
\score | |
annotation: I D | |
c4 | |
d f ef g , | |
g ixhih g h ; | |
h g f ef d , | |
d e d d f e c d :: |
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
deps = Dir["*.tex"] + Dir["*.*bx"] + Dir['*.bib'] | |
main = Dir['*.tex'].first # only one expected | |
main_noext = main.sub '.tex', '' | |
main_pdf = main.sub '.tex', '.pdf' | |
file main_pdf => deps do |t| | |
sh "xelatex #{main_noext}" | |
sh "biber #{main_noext}" | |
sh "xelatex #{main_noext}" |
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
# Application returning unhappy HTTP status codes you ask for, e.g. | |
# GET /404 | |
# returns 404 Not Found etc. | |
# Created for manual testing of HTTP clients. | |
require 'sinatra' | |
require 'json' | |
KNOWN_ERRORS = { | |
400 => 'Bad Request', |
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
# 2016-11-18 | |
# connects to the Church Calendar API | |
# If there is a celebration of rank feast or higher, prints it's title | |
# For me to fill a textbox widget in awesome: | |
# In rc.lua: | |
# | |
# calendarbox = widget({ type = "textbox" }) | |
# calendarbox.text = awful.util.pread("/path/to/feast --calendar=czech-pha") |
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
# takes a list of gabc file paths as commandline arguments, | |
# for each of them prints syllable count, note count and notes per syllable | |
require 'grely' | |
class GabcScore | |
def syllables_count | |
i = 0 | |
each_syllable {|s| i += 1 } | |
i |
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
# mididings patch translating piano pedals to Program switch messages | |
# | |
# I use it to switch presets in aeolus | |
from mididings import * | |
config( | |
client_name='pedal_channel_switch' | |
) |
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
#!/bin/bash | |
# Klasicka otazka studentova: Kolik normostran ma me pdf? | |
if [ $# -lt 1 ] | |
then | |
echo "pdf file expected as command line argument." | |
exit 1 | |
fi |