file_put_contents($file_location, file_get_contents($image_url));
Now go get stealing images!
file_put_contents($file_location, file_get_contents($image_url));
Now go get stealing images!
sys_get_temp_dir()
Didn’t know about this function before today.
open “`pwd`”
PG TIP: I like to add this to my .bash_profile as an alias so I can just type finder to launch it:
alias finder=’open “`pwd`”‘
wget -p -k http://site-you-want-content-from.com/dir/page_name.html
You can get an OS X installation of wget here http://www.statusq.org/archives/2005/02/22/610/
mysqldump -uUSER -pPASSWORD DB_NAME –lock-tables=false > dump.sql
ls -R | grep gif$
The above command will list of the gif files you have in your folder (it will look recussively in subfolders). If you wanted to see the paths as well you could use the find command:
find ./ -name *gif$*
rsync -n –exclude .svn -av /PATH/TO/SOURCE/DIR/* /PATH/TO/DEST/DIR/
rsync –exclude .svn -av /PATH/TO/SOURCE/DIR/* /PATH/TO/DEST/DIR/
The first command will similulate the copy (useful to test). The second command will actually execute the sync.
svn status --no-ignore | grep '^\?' | sed 's/^\? //' | xargs rm -rf
Thanks to Guy Rutenberg for this, your definitely in my list of top 5 guys.
svn add * –-force
svn commit -m “”
find . -name .svn -print0 | xargs -0 rm -rf
This will remove all .svn folders and their contents even in subdirectories. Note if you don’t want the .svn folders it’s better to do an svn export instead of checkout.