Skip to content

Instantly share code, notes, and snippets.

@MichaelGatesDev
MichaelGatesDev / remove_dupes.py
Created August 10, 2021 01:55
Remap & Remove Duplicate Materials + Textures in Blender
import bpy
# credit to https://blender.stackexchange.com/questions/75790/how-to-merge-around-300-duplicate-materials/229803#229803
# remove duplicate materials
def remove_duped_materials():
mats = bpy.data.materials
for mat in mats:
(original, _, ext) = mat.name.rpartition(".")
@xmeng1
xmeng1 / wsl2-network.ps1
Created July 14, 2019 06:50
WSL2 Port forwarding port to linux
$remoteport = bash.exe -c "ifconfig eth0 | grep 'inet '"
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}';
if( $found ){
$remoteport = $matches[0];
} else{
echo "The Script Exited, the ip address of WSL 2 cannot be found";
exit;
}
@rambabusaravanan
rambabusaravanan / .gitconfig
Last active April 30, 2024 04:40
Git Diff and Merge Tool - IntelliJ IDEA
# Linux
# add the following to "~/.gitconfig" file
[merge]
tool = intellij
[mergetool "intellij"]
cmd = /usr/local/bin/idea merge $(cd $(dirname "$LOCAL") && pwd)/$(basename "$LOCAL") $(cd $(dirname "$REMOTE") && pwd)/$(basename "$REMOTE") $(cd $(dirname "$BASE") && pwd)/$(basename "$BASE") $(cd $(dirname "$MERGED") && pwd)/$(basename "$MERGED")
trustExitCode = true
[diff]