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
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
# script analyzing incoming traffic from seznam.cz search | |
# in Apache access log | |
# Seznam search is "kind enough" to preserve the query in referer | |
# typical usage: | |
# grep search.seznam.cz access.log | seznam_searches.rb | |
# | |
# grepping the log isn't really necessary, it just spares the script | |
# parsing each line and makes it work only with the interesting |
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 'countries' | |
require 'json' | |
require 'active_support' | |
require 'sort_alphabetical' | |
lang = ARGV[0] || 'cs' | |
data = ISO3166::Country | |
.all | |
.collect {|c| {name: c.translations[lang], code: c.alpha2} } |
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: Supplementum Antiphonarii pro eclesiis Montis Sion, Siloensi et Neorisensi | |
% Die 4. Martii | |
% Translatio S. Wenceslai Martyris | |
\score | |
office-part: antiphona ad Magnificat | |
mode: 1 | |
annotation: Ad Magnif. |
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
# encoding: utf-8 | |
from __future__ import unicode_literals | |
import sys, re | |
from bs4 import BeautifulSoup | |
import requests | |
from termcolor import colored | |
MENU_URL = 'http://www.pizzeria-manna.cz/index.asp?id=dennimenu' |
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 | |
# petynka.cr | |
# | |
# Extracts temperature and count of visitors from the website | |
# of Koupaliste Petynka, Prague | |
require "http/client" | |
require "http/headers" | |
require "option_parser" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#!/usr/bin/python | |
# jsongetter.py | |
# | |
# reads json file/s, | |
# gets a part specified in a Python dict/list notation, | |
# prints formatted contents | |
# | |
# $ jsongetter.py <keys> [file1 file2 ...] | |
# |
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
#!/usr/bin/env ruby | |
# 2015-05-09 | |
# | |
# prints information from the Koupaliste Petynka's website | |
require 'mechanize' # interaction with websites | |
page = Mechanize.new.get('http://www.koupalistepetynka.cz/') |