Skip to content

Instantly share code, notes, and snippets.

View Roald87's full-sized avatar

Roald87

View GitHub Profile
@Roald87
Roald87 / hardlinkPousToTestProject.bat
Created April 18, 2020 09:23
Batch script to make hardlinks from a TwinCAT plc project to a Unit test project.
@echo off
title Make hard links from project to test project
echo This script will make hard links of the project files in the POUs folder to the test project folder.
echo Before running this script make sure you already created the neccesarry folder structure in your Plc or TwinCAT project.
for %%i in (.\path\to\project\POUs\*.TcPOU) do (
mklink /H .\path\to\testproject\POUs\%%~nxi %%i
)
@Roald87
Roald87 / shadow
Created July 7, 2019 08:20
Bash alias which puts a white border plus a shadow around an image using ImageMagick
shadow() {
mogrify -trim "$1"
mogrify -border 10 -bordercolor white "$1"
convert "$1" \( +clone -background black -shadow 40x8+0+0 \) +swap -background white -layers merge +repage "$1"
}