find [Folder] -name "*.jpg" -exec du -ch {} +
find [Folder] -name "*.png" | grep -v build
(Slow)
find [Folder] -name "*.png" | xargs -I {} cwebp -lossless {} -o {}.webp
/** | |
* Exports file to the given target folder on Android. | |
* | |
* ref: https://stackoverflow.com/questions/75055593/access-images-in-external-storage-created-by-my-app | |
*/ | |
@Throws(IOException::class) | |
suspend fun exportImage( | |
contentResolver: ContentResolver, | |
file: File, | |
targetFolder: String, |
$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; | |
} |
# For 32G+ memory and JDK11+ | |
-Xss2m | |
-Xms1g | |
-Xmx8g | |
-XX:PermSize=512m | |
-XX:MaxPermSize=1024m | |
-XX:ReservedCodeCacheSize=256m |
find [Folder] -name "*.jpg" -exec du -ch {} +
find [Folder] -name "*.png" | grep -v build
(Slow)find [Folder] -name "*.png" | xargs -I {} cwebp -lossless {} -o {}.webp
fun countingLambda(): () -> Int { | |
var counter = 0 | |
val incrementalCounter: () -> Int = { | |
counter += 1 | |
counter | |
} | |
return incrementalCounter | |
} | |
// decompiled java |
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Photo Viewer\Capabilities\FileAssociations] | |
".tif"="PhotoViewer.FileAssoc.Tiff" | |
".tiff"="PhotoViewer.FileAssoc.Tiff" | |
".gif"="PhotoViewer.FileAssoc.Tiff" | |
".jpg"="PhotoViewer.FileAssoc.Tiff" | |
".jpeg"="PhotoViewer.FileAssoc.Tiff" | |
".webp"="PhotoViewer.FileAssoc.Tiff" | |
".png"="PhotoViewer.FileAssoc.Tiff" |
Fix the hidden attribue can't be changed in files
attrib -s -h file1, file2 …
Recovery "show desktop" command
#Edit Desktop.scf with
[Shell]
Command=2
IconFile=explorer.exe,3
[Taskbar]
#1. Show hidden files in Finder | |
defaults write com.apple.finder AppleShowAllFiles -bool true | |
killall Finder | |
#2. Show full path in Finder | |
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true | |
#3. Cancel the auto backup in iTunes | |
defaults write com.apple.iTunes DeviceBackupsDisabled -bool true |
private fun scanDirectory(directory: Path) { | |
Files | |
.walk(directory) | |
.filter { | |
Files.isDirectory(it, LinkOption.NOFOLLOW_LINKS) | |
}.forEach { | |
scope.launch { readBooksFromPath(it) } | |
} | |
} |