sudo vim /etc/launchd-user.confThen, copy and past the following text into it:
umask 002Then, restart your computer.
sudo vim /etc/launchd-user.confThen, copy and past the following text into it:
umask 002Then, restart your computer.
<?php
print_r($_FILES);
/*
THE ABOVE CODE OUTPUTS:
Array
(
[image] => Array
(
[name] => aircraft war military fighter pilot cockpit planes vehicles jet aircraft 3000x1928 wallpaper_www.wallpaperhi.com_6.jpg
[type] => image/jpeg
[tmp_name] => /Applications/MAMP/tmp/php/phpzqf0Y6
[error] => 0
[size] => 383379
)
)
*/
; Maximum amount of memory a script may consume (8MB). memory_limit = 256M ; Maximum size of POST data that PHP will accept. post_max_size = 32M ; Maximum allowed size for uploaded files. upload_max_filesize = 32M
<?php
$getimagesize = getimagesize('example/image/path/file.png');
print_r($getimagesize);
exit;
/*
THE ABOVE CODE OUTPUTS:
Array
(
[0] => 1748
[1] => 1165
[2] => 2
[3] => width="1748" height="1165"
[bits] => 8
[channels] => 4
[mime] => image/jpeg
)
*/
dseditgroup -o edit -u your_admin_username -p -a the_username_of_user_you_want_to_add_to_group -t user the_name_of_the_group_you_want_to_add_user_toIf I wanted to add myself to the "www" group I would simply run the following command:
dseditgroup -o edit -u johnerck -p -a johnerck -t user wwwRun the groups command to see that you've been added:
groups
mysqldump --skip-comments --no-data -u your_user1 -p your_database_name1 > file_1.sql mysqldump --skip-comments --no-data -u your_user2 -p your_database_name2 > file_2.sql diff file_1.sql file_2.sqlNote that the first two lines may end up being identical except for the .sql file name at the end of the command (because databases that you want to compare often exist in independent environments). For example, you might run the first command locally and the second on a remote dev machine. In both instances your user may be root and your database name might be the name of your project. If you run the first command on your local machine and the second on a remote, you'll have to scp file_2.sql to your local machine before running the diff command. Enjoy!
# To list files that contain "the phrase" grep 'the phrase' -li -r /etc
# To search for "the phrase" within a specific file grep 'the phrase' /etc/httpd/conf/httpd.confThis command is particularily useful if you're searching a folder full of MS Word docs. Word docs aren't plain text files (duh) and therefore don't get matched properly by most application level search features (e.g. TextWrangler).