Skip to content

Instantly share code, notes, and snippets.

@Roald87
Roald87 / hardlinkPousToTestProject.bat
Created Apr 18, 2020
Batch script to make hardlinks from a TwinCAT plc project to a Unit test project.
View hardlinkPousToTestProject.bat
@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 Jul 7, 2019
Bash alias which puts a white border plus a shadow around an image using ImageMagick
View shadow
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"
}