Skip to content

Instantly share code, notes, and snippets.

View vmario89's full-sized avatar
🤓
dafuq

Mario Voigt vmario89

🤓
dafuq
View GitHub Profile
@vmario89
vmario89 / GitSymlinks.sh
Last active August 30, 2024 11:22
Fix cygwin symlink files containing "!<symlink>" and convert them to real symlink using ln -s
@vmario89
vmario89 / colorls-setup.sh
Last active June 17, 2018 14:52
Install colorls - OneLiner
sudo apt-get install ruby ruby-dev; sudo gem install colorls; echo "alias lc='colorls -lA --sd'" >> ~/.bashrc; source ~/.bashrc
@vmario89
vmario89 / removeACLs.sh
Last active June 17, 2018 15:03
Script for bash to remove ACLs from files and re-apply standard permissions for directories and folders
#ACL everything
date;
time (echo "Collecting files ...";
(find / \( -path /cygdrive -o -path /dev -o -path /home -o -path /mnt -o -path /proc \) -prune -o ! -type l -print0 | xargs -0 stat -c "%a %n" ) > ~/ACLsToFix;
echo "Removing ACLs ...";
find / \( -path /cygdrive -o -path /dev -o -path /home -o -path /mnt -o -path /proc \) -prune -o ! -type l -exec echo "setfacl -bk {}" \; -exec setfacl -bk {} \; ;
echo "Updating file permissions to non-ACL standard";
while read i; do chmod -vc $i;
done < ~/ACLsToFix);
date
@vmario89
vmario89 / convert.py
Last active November 2, 2021 07:47
Convert DXF to SVG using ezdxf
#!/usr/bin/env python3
import matplotlib.pyplot as plt
import ezdxf
from ezdxf.addons.drawing import RenderContext, Frontend
from ezdxf.addons.drawing.matplotlib_backend import MatplotlibBackend
doc = ezdxf.readfile(YOURFILE)
fig = plt.figure()
out = MatplotlibBackend(fig.add_axes([0, 0, 1, 1]))
Frontend(RenderContext(doc), out).draw_layout(doc.modelspace(), finalize=True)
@vmario89
vmario89 / determine-if-svg-path-is-contained-in-other-path-example.py
Created April 15, 2021 09:00 — forked from mathandy/determine-if-svg-path-is-contained-in-other-path-example.py
An example of how to determine if an SVG Path is contained in another SVG Path in Python.
"""
An example of how to determine if an svg path is contained in another
svg path in Python.
Note: for discontinuous paths you can use the svgpathtools
Path.continuous_subpaths() method to split a paths into a list of its
continuous subpaths.
"""
from svgpathtools import *