Skip to content

Instantly share code, notes, and snippets.

View grigory-rechistov's full-sized avatar

Grigory Rechistov grigory-rechistov

  • Intel
View GitHub Profile
% Can be compied with XelaTeX from:
% * TL 2013 - recent versions
% FIXME: EB Garamond Bold font face is absent at the moment.
\documentclass[a5paper,11pt,twoside,titlepage, numbers=endperiod]{scrbook}
\def \documentversion {0.1} % increment and don't forget to update history.tex
\tolerance=9999 % let the text underfull be ugly as hell, nobody cares.
\widowpenalty=9998 % try to avoid widow lines
@grigory-rechistov
grigory-rechistov / upload-gpx-tracks.py
Created October 8, 2015 17:10
upload-gpx-tracks.py
#!/usr/bin/env python2.7
# upload-gpx-tracks.py - upload latest GPX tracks from a Garmin device
# to Strava http://strava.com using Strava API
# It is meant to be automatically run on each USB storage device attachment.
# Usage: upload-gpx-tracks.py <device>
#
# Copyright (C) 2015 Grigory Rechistov
#
# This program is free software: you can redistribute it and/or modify
#!/bin/sh
# /etc/init.d/teamcity # startup script for TeamCity
### BEGIN INIT INFO
# Provides: teamcity
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: TeamCity CI
### END INIT INFO
This file has been truncated, but you can view the full file.
09-12 13:27:58:476 "################## ownCloud ru_RU () 1.4.0"
09-12 13:27:58:477 void Mirall::Application::setupTranslations() Using "en_US" translation
09-12 13:27:58:780 * Setup folders from "C:\Users\grechist\AppData\Local\ownCloud/folders"
09-12 13:27:58:781 ` -> setting up: "bureaucracy"
09-12 13:27:58:782 -> file path: "C:/Users/grechist/AppData/Local/ownCloud/folders/bureaucracy"
09-12 13:27:58:782 * Pending events for "C:\Users\grechist\Documents\ownCloud\bureaucracy" will be processed after events stop for 1000 milliseconds ( "13:44:38" ). 0 events until now )
09-12 13:27:58:782 ==> returning exclude file path: "C:/Program Files (x86)/ownCloud/sync-exclude.lst"
09-12 13:27:58:783 ==> returning exclude file path: "C:/Users/grechist/AppData/Local/ownCloud/sync-exclude.lst"
09-12 13:27:58:783 Checked local path ok
09-12 13:27:58:784 setting remote poll timer interval to 30000 msec
{"app":"updater","message":"Retrieving http:\/\/download.owncloud.org\/community\/owncloud-5.0.6.tar.bz2","level":3,"time":1369590554}
{"app":"updater","message":"Unable to create \/var\/www\/owncloud\/backup\/5.0.8","level":3,"time":1369590554}
{"app":"core","message":"starting upgrade from 5.0.6 to 5.0.8","level":2,"time":1369591247}
{"app":"PHP","message":"SQLSTATE[HY000]: General error: 17 database schema has changed at \/var\/www\/owncloud\/lib\/db.php#966","level":4,"time":1369591249}
{"app":"PHP","message":"SQLSTATE[HY000]: General error: 17 database schema has changed at \/var\/www\/owncloud\/lib\/db.php#966","level":4,"time":1369591249}
{"app":"PHP","message":"SQLSTATE[HY000]: General error: 17 database schema has changed at \/var\/www\/owncloud\/lib\/db.php#966","level":4,"time":1369591249}
{"app":"PHP","message":"SQLSTATE[HY000]: General error: 17 database schema has changed at \/var\/www\/owncloud\/lib\/db.php#966","level":4,"time":1369591250}
{"app":"PHP","message":"Only variables should be passe
@grigory-rechistov
grigory-rechistov / README.md
Created May 26, 2016 08:48 — forked from KonradIT/readme.md
GoPro Studio for Linux tips and tricks

####GoPro Protune correction, timelapse assembling, fisheye removal, slow motion, 4:3 to 16:9 and motion blur in Linux OS - GoPro Studio for Linux - KDEnlive, FFMPEG, ImageMagick, Mencoder and Python!

GoPro Studio has been tremendously useful for GoPro users, but not all GoPro users can enjoy the tool, there is no GoPro Studio for Linux. So some users made their ways to emulate GoPro Studio on Linux.

This guide is more than GoPro Studio, is a must read guide for Linux and GoPro users.

The main features of GoPro Studio are:

  • Convert and edit Protune footage and apply Protune effect.
  • Convert 4:3 footage to 16:9
  • Slow motion
#!/usr/bin/env python
#Copyright (c) 2014, 2016, Grigory Rechistov <grigory.rechistov@phystech.edu>
#All rights reserved.
#Redistribution and use in source and binary forms, with or without modification,
#are permitted provided that the following conditions are met:
#1. Redistributions of source code must retain the above copyright notice,
#this list of conditions and the following disclaimer.
#!/usr/bin/python3
# Ta in en GeoJSON fil av QGIS,
# producera en ny GeoJSON med nya etiketter och brus tillagt till koordinater
# Källor och referenser:
# - http://www.naturvardsverket.se/Sa-mar-miljon/Kartor/Nationella-Marktackedata-NMD/
# - http://gpt.vic-metria.nu/data/land/NMD/NMD_Produktbeskrivning_NMD2018Basskikt_v1_0.pdf
# - https://lists.openstreetmap.org/pipermail/talk-se/2019-March/003537.html
@grigory-rechistov
grigory-rechistov / generate-commute-tracks.py
Last active August 21, 2019 16:23
Randomize GPX trajectory in space and time
#!/usr/bin/python
# TODO: port to Python3
# Take an input GPX track and generate a series of identical tracks
# shifted in time and with noise added to individual points' coordinates and
# timestamps.
import xml.etree.ElementTree as ET
from sys import argv
from random import random
@grigory-rechistov
grigory-rechistov / commit-msg.sh
Created June 23, 2020 12:59
Check spelling in Git commit hook
# Add this snippet to the end of your .git/hook/commit-msg script
# Check spelling
ASPELL=$(which aspell 2> /dev/null)
if [ $? -ne 0 ]; then
echo "Aspell not installed, unable to check spelling" >&2
else
WORDS=$(grep -v "^Change-Id:" "$1"| $ASPELL --mode=email --add-email-quote='#' list | sort -u)
if [ -n "$WORDS" ]; then
echo -ne "\e[31m"
printf "### Possible spelling errors found in commit message: ###\n%s\n" "$WORDS" >&2