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

Do GitHub pages support PHP? [closed]

A static site cannot by definition support PHP. Static websites serve content directly from the web-server’s file-system exactly as stored. Dynamic websites generate content live per each request. The request is delegated to a running web-application that builds the content. What is a Static Website You might be interested in PieCrust. It is a static … Read more

GitHub Api download zip or tarball link

You can wget your way out of the GitHub repo to get a tar file (archive): wget –no-check-certificate https://github.com/User/repo/archive/master.tar.gz # better, if the certificate authorities are present: wget https://github.com/User/repo/archive/master.tar.gz will get you a file named ‘master’ from the user ‘User”s repo ‘repo’. The updated V3 API url is: https://api.github.com/repos/User/repo/:archive_format/:ref # # two possibilities for fomat: … Read more