Skip to content

Instantly share code, notes, and snippets.

@Iv
Iv / igc2kmz.reg
Created November 2, 2017 03:21
register igc2kmz.bat as right click command
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Folder\shell\Create KMZ for IGC files]
@="Create KMZ for IGC files"
[HKEY_CLASSES_ROOT\Folder\shell\Create KMZ for IGC files\command]
@="\"C:\\igc\\igc2kmz.bat\" \"%1\""
@Iv
Iv / igc2kmz.bat
Created November 2, 2017 03:19
Uses perfetct lib https://github.com/twpayne/igc2kmz to convert all *.igc files in dir to *.kmz
@echo off
setlocal enabledelayedexpansion
set targetfolder=%1
cd /d %targetfolder%
for /f "usebackq delims=|" %%F in (`dir /s /b %targetdir%*.igc`) do (
for %%a in ("%%F") do for %%b in ("%%~dpa\.") do set "pname=%%~nxb"
@Iv
Iv / igc2kmz.sh
Created November 2, 2017 03:16
Uses perfetct lib https://github.com/twpayne/igc2kmz to convert all *.igc files in dir to *.kmz
#!/bin/bash
#
# Uses perfetct lib https://github.com/twpayne/igc2kmz to convert
# all *.igc files in dir to *.kmz
# Put color.txt with color line like FF00FFFF in each subfolder to define track color
IGC2KMZ="/home/iv/asa/igc2kmz/bin/igc2kmz.py"
PY="/usr/bin/python2.7"
usage() { echo "Usage: $0 [-d <string> directory to search for igc files]" 1>&2; exit 1; }
@Iv
Iv / genkeys.sh
Created August 21, 2017 05:46 — forked from jhamrick/genkeys.sh
Generate SSL certificates with IP SAN
#!/usr/bin/env bash
#
# Generate a set of TLS credentials that can be used to run development mode.
#
# Based on script by Ash Wilson (@smashwilson)
# https://github.com/cloudpipe/cloudpipe/pull/45/files#diff-15
#
# usage: sh ./genkeys.sh NAME HOSTNAME IP
set -o errexit
@Iv
Iv / kulak.m
Last active October 18, 2022 17:30
A=260/2; %Половина амплитуды дышла
L=800; %Длинна дышла
d= 0; %От центральной оси до центра ролика.
R=-155; % До кулака
X= -38;
Rr=-155; % Радиус на котором находятся ролики
t=0:0.05:2*pi;
w = 1;
k=(-A + 2*A*w*t/pi).*(t<=pi/w) + (3*A - 2* A*w*t/pi).*(t>pi/w); % боковое отклонение конца дышла
@Iv
Iv / mathjax-gist.user.js
Created January 19, 2016 16:26 — forked from cgranade/mathjax-gist.user.js
Adds MathJax support to GitHub Gists. Useful for working with Markdown documents.
// ==UserScript==
// @name MathJax for Gists
// @include *://gist.github.com/*
// @version 0.1
// @description Adds MathJax support to Gists.
// ==/UserScript==
if ((window.unsafeWindow == null ? window : unsafeWindow).MathJax == null) {
var script = document.createElement("script");
script.type = "text/javascript";