Skip to content

Instantly share code, notes, and snippets.

Avatar

Ilya Zverev Zverik

View GitHub Profile
View game.txt
{"gameLink":"www.flickgame.org","canvasses":[[65,"e",6,"f",153,"e",8,"f",152,"e",8,"f",152,"e",8,"f",151,"e",10,"f",149,"e",11,"f",97,"e",4,"1",48,"e",11,"f",96,"e",13,"1",40,"e",11,"f",96,"e",21,"1",23,"e",1,"1",8,"e",12,"f",95,"e",3,"1",2,"4",41,"1",7,"e",12,"f",15,"e",14,"1",66,"e",3,"1",10,"4",33,"1",7,"e",12,"f",13,"e",21,"1",61,"e",3,"1",18,"4",25,"1",7,"e",12,"f",3,"e",1,"1",6,"e",29,"1",56,"e",3,"1",39,"4",3,"1",8,"e",12,"f",2,"e",13,"1",14,"d",15,"1",51,"e",3,"1",39,"4",3,"1",8,"e",12,"f",2,"e",11,"1",21,"d",16,"1",45,"e",3,"1",39,"4",3,"1",9,"e",10,"f",3,"e",8,"1",29,"d",16,"1",40,"e",3,"1",38,"4",3,"1",11,"e",8,"f",4,"e",3,"1",39,"d",15,"1",36,"e",3,"1",38,"4",3,"1",23,"e",3,"1",45,"d",10,"1",36,"e",3,"1",37,"4",3,"1",23,"e",3,"1",50,"d",5,"1",36,"e",3,"1",37,"4",3,"1",23,"e",3,"1",52,"d",3,"1",36,"e",3,"1",37,"4",3,"1",23,"e",3,"1",52,"d",3,"1",36,"e",3,"1",36,"4",3,"1",24,"e",3,"1",52,"d",3,"1",36,"e",3,"1",36,"4",3,"1",23,"e",3,"1",53,"d",3,"1",36,"e",3,"1",36,"4",3,"1",23,"e",3,"1",53,"d",3,"1"
View get_podcast_length.py
#!/usr/bin/env python3
import requests
import json
import re
import statistics
import time
resp = requests.get('https://russiancast.club/data.json')
data = resp.json()
@Zverik
Zverik / make_stop_areas.py
Created Sep 20, 2017
Add stop_area relations to a map
View make_stop_areas.py
#!/usr/bin/env python3
import json
from lxml import etree
import sys
import kdtree
import math
QUERY = """
[out:json][timeout:25][bbox:{{bbox}}];
@Zverik
Zverik / build_dmg.sh
Created Nov 16, 2016
Build script for a DMG file of MAPS.ME desktop
View build_dmg.sh
#!/bin/bash
set -e -u
OMIM_PATH="$(cd "${OMIM_PATH:-$(dirname "$0")/../..}"; pwd)"
DATA_PATH="$OMIM_PATH/data"
BUILD_PATH="$OMIM_PATH/out"
RELEASE_PATH="$BUILD_PATH/release"
source "$OMIM_PATH/tools/autobuild/detect_qmake.sh"
#rm -rf "$RELEASE_PATH"
@Zverik
Zverik / vecher2016.md
Last active Oct 21, 2016
Ссылки для «Вечера оживших карт»
View vecher2016.md

Беспорядочная свалка, почти всё это я показал на «вечере». Есть вопросы? Задавайте на ilya@zverev.info или в телеграме.

@Zverik
Zverik / index.html
Last active May 24, 2016 — forked from anonymous/index.html
Presentation
View index.html
<!DOCTYPE html>
<html>
<head>
<title>Foo</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<style type='text/css'>
body {
font-family: 'Helvetica Neue';
background:#000;
@Zverik
Zverik / geo.php
Created Oct 8, 2014
Display icecast2 listeners count by country and by city
View geo.php
<?php
$login = 'admin';
$password = '<password>';
$mount = '/radio';
$server = '<ip>:8000';
$url = "http://$server/admin/listclients?mount=$mount";
$opts = array('http' => array(
'method' => 'GET',
'header' => 'Authorization: Basic '.base64_encode("$login:$password")."\r\n"
));
@Zverik
Zverik / osmradio.sh
Created Sep 17, 2014
PulseAudio setup for recording osm radio from skype and mic
View osmradio.sh
#!/usr/bin/sh
# PulseAudio setup for recording osm radio from skype and mic
function rec_start() {
IP=127.0.0.1
PASSWORD=password
DATE=$(date +%y%m%d-%H%M)
# Initializing microphone
MIC_ID=$(pactl list short sources|grep GoMic|grep input|cut -f 1)
@Zverik
Zverik / osm-shields.py
Created Jul 4, 2014
Generate SVG shields for osm.org style
View osm-shields.py
#!/usr/bin/python
# Generate SVG shields for https://github.com/gravitystorm/openstreetmap-carto
WIDTHS = {
1: 0.0, 2: 7.25, 3: 14.5, 4: 21.0,
5: 28.5, 6: 34.5, 7: 41.25, 8: 48.0,
9: 52.5, 10: 57.75, 11: 62.75
}
TYPES = { 'mot': '#7788a1', 'pri': '#bb7b7f', 'sec': '#c6ad84', 'ter': '#c4c68f' }
@Zverik
Zverik / Leaflet.LimitZoom.js
Created Jun 26, 2014
Leaflet LimitZoom plugin
View Leaflet.LimitZoom.js
// Limit leaflet map zoom to a list of variants
// Written by Ilya Zverev, licensed WTFPL
L.Map.mergeOptions({
zooms: [] // array of integers
});
L.Map.include({
_limitZoom: function (zoom) {
var zooms = this.options.zooms;