Skip to content

Instantly share code, notes, and snippets.

View adrianoc's full-sized avatar

Adriano Carlos Verona adrianoc

View GitHub Profile
# finding all file extensions in a subfolder excluding some specific ones.
find folder -type f ! \( -iname *.excluded \) | sed 's|.*\.||' | sort -u
@adrianoc
adrianoc / LinuxUsage.md
Last active May 1, 2023 11:49
useful Linux usage info

Linux notes

enable debug native code

sudo sysctl kernel.yama.ptrace_scope=0

add ssh keys to access git repos

$ eval "$(ssh-agent -s)" $ ssh-add path-to-private key

@adrianoc
adrianoc / RemoveNonScriptAssets.sh
Last active June 2, 2023 18:25
Remove any non script related asset from current (and child) directory
#!/bin/bash
IFS=' ' read -ra FILEEXTS <<< "*.tga *.psd *.wav *.exr *.ttf *.jpg *.png *.fbx *.mp3 *.mp4 *.shader *.shadergraph *.mat *.playable *.controller *.prefab *.unity *.cubemap *.anim *.asset *.hdr *.dds *.max *.mesh *.vfx *.brush *.inputactions *.mixer *.overrideController *.shadersubgraph *.shadervariants *.swatch *.terrainlayer *.tpsheet *.txt *.blend *.bmp *.tif *.blend1"
for FILE_EXT in "${FILEEXTS[@]}"; do
echo $FILE_EXT
find . -iname "$FILE_EXT" -exec rm -rf {} \;
find . -iname "$FILE_EXT.meta" -exec rm -rf {} \;
done
@adrianoc
adrianoc / DotNet links.md
Last active December 1, 2023 15:20
A bunch of links to pages related to .Net
@adrianoc
adrianoc / RemoveNonScriptAssets.bat
Last active June 2, 2020 15:21
Remove all non script related assets from Unity project
@echo off
for /F "delims=," %%f in ('dir *.psd *.wav *.exr *.ttf *.jpg *.png *.fbx *.mp3 *.mp4 *.shader *.mat *.playable *.controller *.prefab *.unity *.cubemap *.anim *.asset *.hdr *.dds *.max /s /b') do call :remove_non_asset "%%f"
goto :eof
:remove_non_asset
del %1 /s /q
if exist "%~1.meta" del "%~1.meta" /s /q
goto :eof