Skip to content

Instantly share code, notes, and snippets.

View grigory-rechistov's full-sized avatar

Grigory Rechistov grigory-rechistov

  • Intel
View GitHub Profile
@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
#!/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
#!/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.
@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
#!/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
@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
@grigory-rechistov
grigory-rechistov / parse_lmgrd.py
Last active August 11, 2023 14:55
lmgrd log file parser
#!/usr/bin/env python2
# The script to parse a lmgrd log and give some license usage metrics
#
# Copyright (c) 2014 Grigory Rechistov <grigory.rechistov@gmail.com>
# 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,
@grigory-rechistov
grigory-rechistov / lmgrd-simics
Last active September 6, 2023 07:38
Flexera's lmgrd SysV script for Simics lmgrd-simics
#! /bin/sh
### BEGIN INIT INFO
# Provides: lmgrd-simics
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Control Flexera lmgrd license daemon for Simics installation
# Description: Control start/stop of lmgrd entry for Simics
#
% 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