How to limit file size on commit?

This pre-commit hook will do the file size check: .git/hooks/pre-commit #!/bin/sh hard_limit=$(git config hooks.filesizehardlimit) soft_limit=$(git config hooks.filesizesoftlimit) : ${hard_limit:=10000000} : ${soft_limit:=500000} list_new_or_modified_files() { git diff –staged –name-status|sed -e ‘/^D/ d; /^D/! s/.\s\+//’ } unmunge() { local result=”${1#\”}” result=”${result%\”}” env echo -e “$result” } check_file_size() { n=0 while read -r munged_filename do f=”$(unmunge “$munged_filename”)” h=$(git ls-files … Read more

Maximum number of concurrent connections on a single port (socket) of Server

This depends in part on your operating system. There is however no limit on a specific port. There is a limit on the number of concurrent connections however, typically limited by the number of file descriptors the kernel supports (eg 2048). The thing to remember is that a TCP connection is unique and a connection … Read more