Skip to content

Instantly share code, notes, and snippets.

View jarosluv's full-sized avatar

Jaroslav Toropygin jarosluv

View GitHub Profile
@jarosluv
jarosluv / stations.json
Created March 23, 2016 15:45
List of Saint Petersburg Metro Stations — 2016 / Список станций Петербургского метро — 2016
[
{
"line": "Кировско-Выборгская",
"stations": ["Девяткино", "Гражданский проспект", "Академическая", "Политехническая", "Площадь Мужества", "Лесная", "Выборгская", "Площадь Ленина", "Чернышевская", "Площадь Восстания", "Владимирская", "Пушкинская", "Технологический институт", "Балтийская", "Нарвская", "Кировский завод", "Автово", "Ленинский проспект", "Проспект Ветеранов"]
},
{
"line": "Московско-Петроградская",
"stations": ["Парнас", "Проспект Просвещения", "Озерки", "Удельная", "Пионерская", "Чёрная речка", "Петроградская", "Горьковская", "Невский проспект", "Сенная площадь", "Технологический институт", "Фрунзенская", "Московские ворота", "Электросила", "Парк Победы", "Московская", "Звёздная", "Купчино"]
},
{
@jarosluv
jarosluv / stations.json
Last active March 30, 2021 06:50
List of Moscow Metro Stations — 2016 / Список станций Московского метро — 2016
Станции метро переехали сюда https://github.com/jarosluv/russian_infrastructure.
@skanev
skanev / rubocop.rb
Last active March 13, 2024 08:24
A Rubocop wrapper that checks only added/modified code
#!/usr/bin/env ruby
# A sneaky wrapper around Rubocop that allows you to run it only against
# the recent changes, as opposed to the whole project. It lets you
# enforce the style guide for new/modified code only, as opposed to
# having to restyle everything or adding cops incrementally. It relies
# on git to figure out which files to check.
#
# Here are some options you can pass in addition to the ones in rubocop:
#
@timrauhut
timrauhut / gist:964547
Created May 10, 2011 14:15
Simple nokogiri xsd validator
require 'rubygems'
require 'nokogiri'
def validate(document_path, schema_path)
schema = Nokogiri::XML::Schema(File.read(schema_path))
document = Nokogiri::XML(File.read(document_path))
schema.validate(document)
end
validate('document.xml', 'schema.xsd').each do |error|
puts error.message
@csasbach
csasbach / tooltip.css
Created March 13, 2011 00:34
Create tooltips on mouseover or on click (for supporting touch interfaces).
abbr
{
border-bottom: 1px dotted #666;
cursor: help;
}
.tooltip
{
position:absolute;
background-color:#eeeefe;