Skip to content

Instantly share code, notes, and snippets.

View severak's full-sized avatar

Mikoláš Štrajt severak

View GitHub Profile
@severak
severak / GpsParser.php
Created July 13, 2016 09:38
GPS Coordinates Parser
<?php
/**
* GPS Coordinates Parser
*
* Forms:
* - 49.7175669N, 15.3728881E
* - N 49°43.05402', E 15°22.37328'
* - 49°43'3.241"N, 15°22'22.397"E
* - N48.7382° E19.56845°
@severak
severak / fcgiserver.bat
Last active September 26, 2018 08:46
php-fcgi runner for windows
@ECHO OFF
rem (c) Severak 2018
SETLOCAL
IF "%1"=="start" goto f_start
IF "%1"=="stop" goto f_stop
echo Usage:
echo fcgiserver start [port=9000]
@severak
severak / Caddyfile
Last active September 19, 2016 12:50
Caddyfile pro symfony projekt
#
# config pro development pomoci Caddy serveru (https://caddyserver.com/)
#
# teoreticky by mělo běhat o něco rychleji než vestavěný php server
# (Caddy je vícevláknový)
#
# dále viz https://github.com/caddyserver/examples
# a https://gist.github.com/severak/2600b49caae377a594d7585128495895
localhost:80 {
@severak
severak / linkify.php
Created October 5, 2016 14:53 — forked from jasny/linkify.php
PHP function to turn all URLs in clickable links
<?php
/**
* Turn all URLs in clickable links.
*
* @param string $value
* @param array $protocols http/https, ftp, mail, twitter
* @param array $attributes
* @param string $mode normal or all
* @return string
*/
# ztratila klice
with_fx :reverb do
live_loop :ztratila do
use_synth :prophet
play chord(:G, :major), release: 1.5
sleep 1
play chord(:A, :minor)
sleep 0.5
play chord(:A, :minor)
@severak
severak / gidole.log
Created December 2, 2016 18:34
gidole font test
open source > 1 > 1 > /usr/share/texmf/tex/context/base/cont-yes.mkiv
ConTeXt ver: 2014.05.21 22:04 MKIV beta fmt: 2016.11.12 int: english/english
system > 'cont-new.mkiv' loaded
open source > 2 > 2 > /usr/share/texmf/tex/context/base/cont-new.mkiv
close source > 2 > 2 > /usr/share/texmf/tex/context/base/cont-new.mkiv
system > files > jobname 'gidole', input './gidole', result 'gidole'
fonts > latin modern fonts are not preloaded
languages > language 'en' is active
@severak
severak / overpass.geojson
Created December 8, 2016 13:35 — forked from anonymous/overpass.geojson
data exported by overpass turbo
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/bin/bash
machine='debian.ll'
status='up'
# get ip
ip=`ip route get 1 | awk '{print $NF;exit}'`
# announce it
wget -qO- "http://status.svita.cz/ann.php?machine=${machine}&status=${status}&ip=${ip}" &> /dev/null
--Yet another SOUP.IO downloader/backup tool
--------------------------------------------------------------------------------
--Written by Severak, released with MIT license.
--Feel free to modify.
--
--Example of usage:
--
--lua5.1 soup.lua moomins.soup.io
--(last 20 from public rss)
--lua5.1 soup.lua http://www.soup.io/export/your-secret-hash.rss
-- Kyselo/Resoup DB schema
-- public part
CREATE TABLE blogs (
id INTEGER PRIMARY KEY,
name TEXT UNIQUE,
title TEXT,
about TEXT,
avatar_url TEXT,