This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this original one uses values returned from 'brew info' | |
brew list --formula | xargs -n1 -P8 -I {} \ | |
sh -c "brew info {} | egrep '[0-9]* files, ' | sed 's/^.*[0-9]* files, \(.*\)).*$/{} \1/'" | \ | |
sort -h -r -k2 - | column -t | |
# faster alternative using 'du' | |
du -sch $(brew --cellar)/*/* | sed "s|$(brew --cellar)/\([^/]*\)/.*|\1|" | sort -k1h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# erlang deps | |
sudo yum groupinstall "Development Tools" | |
sudo yum install ncurses-devel openssl-devel | |
# erlang | |
wget http://erlang.org/download/otp_src_20.1.tar.gz | |
tar -zxvf otp_src_20.1.tar.gz | |
rm -f otp_src_20.1.tar.gz | |
cd otp_src_20.1/ | |
./configure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
def get_files(path): | |
arr = os.listdir(path) | |
print(arr) | |
return arr | |
def replace_in_files(path, words,uppers=True): | |
files = os.listdir(path) | |
for f in files: |