Skip to content

Instantly share code, notes, and snippets.

View wouterpotters's full-sized avatar
🏠
Working from home

Wouter wouterpotters

🏠
Working from home
View GitHub Profile
@wouterpotters
wouterpotters / move_word_title_to_comments.sh
Created October 7, 2022 12:24
Bash function to copy MS Office title metadata to the Finder Comments field
# For use on MacOS
# MacOS cannot show the title metadata of MS Office files. This script shows the
# metadata in the Comment field, which can be made visible in the finder app.
# Script to extract the MS Office word title metadata and excel title metadata
# and copy that text to Comment field, which can be visible in the Finder.app
# This enables you to show the comment in Finder.app
#
#
# Installation
#
@wouterpotters
wouterpotters / gist:c9b4c1cf07acc3bcae4f
Created February 10, 2015 16:44
Matlab memory function for Mac OS X
if ismac % if computer is a mac.
[~,txt] = system('sysctl -a | grep hw.memsize | awk ''{print $2}'''); % get physical system memory
memory_avail_in_gb = (eval(txt)/1024^3); % convert from byte to Gb.
fprintf(['Available memory: ' num2str(memory_avail_in_gb) ' Gb']) % display amount of memory available
else % on pc's
memory % use builtin memory function
end