To fix it, on your mac do:
emacs (or vim/vi/nano/etc) ~/.ssh/config
And then, write this:
perl -i -p -e 's/search/replace/' filename; |
find <folder> -type d -exec chmod 755 {} \; | |
find <folder> -type f -exec chmod 644 {} \; |
Try this first: | |
git checkout master | |
(If you're on a different branch than master, use the branch name there instead.) | |
If that doesn't work, try... | |
For a single file: | |
git checkout HEAD /path/to/file |
find ./ -type f -exec sed -i 's/find/replace/g' {} \; |
Run all tests | |
```python | |
#file __init__.py | |
def load_tests(loader, standard_tests, pattern): | |
# top level directory cached on loader instance | |
this_dir = os.path.dirname(__file__) + '/tests' | |
package_tests = loader.discover(start_dir=this_dir, pattern=pattern) | |
standard_tests.addTests(package_tests) | |
return standard_tests | |
``` |
What you're seeing is probably because the server serving the static files is using the "sendfile()" syscall, which is broken with the VirtualBox file system. You need to disable sendfile() usage in your server. For Apache: | |
EnableSendfile off | |
And for nginx: | |
sendfile off; |
# find old files and calculate their size in Mb | |
find ./logs/* -type f -mtime +180 -exec du -ks {} \; | cut -f1 | awk '{total=total+$1}END{print total/1024}' |
perl -e 'BEGIN{$/=\32768}' -pe "s/a/b/g" < one-line-250-mb.txt |
#!/usr/bin/env bash | |
#extract phar | |
phar extract -f php_util.phar extracted | |
#how to check is in phar | |
#if (strpos(__DIR__, 'phar://') === 0) {} |
To fix it, on your mac do:
emacs (or vim/vi/nano/etc) ~/.ssh/config
And then, write this: