Skip to content

Instantly share code, notes, and snippets.

@sir-wilhelm
sir-wilhelm / LOS-Rounder.ps1
Created June 3, 2020 13:48
Powershell script that rounds LOS points in Fantasy Grounds LOS xml files.
<#
.Synopsis
Rounds LOS points in Fantasy Grounds LOS xml files.
.Description
Rounds the first and last point in Fantasy Grounds xml files.
This does not round points if closedpolygon is `true`.
The points are only rounded to the nearest 100 if they are within 5 of the nearest 100.
.Example
.\LOS-Rounder.ps1 .\Tile 01.xml
Rounds LOS points in a single file.

Keybase proof

I hereby claim:

  • I am sir-wilhelm on github.
  • I am willstrohmeier (https://keybase.io/willstrohmeier) on keybase.
  • I have a public key whose fingerprint is 6C55 166B 1563 399E 1D7A A9F0 06E2 92A8 2DF4 8DE8

To claim this, I am signing this object:

@sir-wilhelm
sir-wilhelm / clipboard-to-youtrack-table.ps1
Last active October 5, 2020 13:46
Converts csv or tabbed tables on clipboard to youtrack friendly versions
function Clipboard-To-YT-Markdown-Table
{
$table = (Get-Clipboard) -replace "^|\t|$","|"
$columns = $table[0].Split("|").GetUpperBound(0) - 1
$columnRow = "`r`n|" + "---|" * $columns
$table[0] = $table[0] + $columnRow
Set-Clipboard $table
Get-CLipboard
}

Setup

Guide written for debian (tested on 8.6), for teamcity 10, using an account with sudo.

Teamcity 10 requires java8, so modify the sources list to include jessie-backports.

The following line needs to be added to /etc/apt/sources.list:

deb http://ftp.us.debian.org/debian/ jessie-backports main

Setup

Guide assumes debian (tested on 8.6) for YouTrack 7.0, using an account with sudo.

Jessie-backports needs to be added to the source list for java8 and an updated nginx. To do this add add the following line to /etc/apt/sources.list:

deb http://ftp.us.debian.org/debian/ jessie-backports main

Install the required packages:

sudo apt-get update