Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
<?php | |
/** | |
* Dump helper. Functions to dump variables to the screen, in a nicley formatted manner. | |
* @author Joost van Veen | |
* @version 1.0 | |
*/ | |
if (!function_exists('dump')) { | |
function dump ($var, $label = 'Dump', $echo = TRUE) | |
{ | |
// Store dump in variable |
<?php | |
/** | |
* A helper file for Laravel 5, to provide autocomplete information to your IDE | |
* Generated for Laravel 5.5.13 on 2017-09-28. | |
* | |
* @author Barry vd. Heuvel <[email protected]> | |
* @see https://github.com/barryvdh/laravel-ide-helper | |
*/ | |
namespace { | |
exit("This file should not be included, only analyzed by your IDE"); |
# Get available disk space | |
df -h | |
# Get the top 10 biggest folders in the current directory | |
du -h --max-depth=1 | sort -rh | head -10 | |
# Get the top 10 biggest folders in the current directory and their first child directories | |
du -h --max-depth=2 | sort -rh | head -10 | |
# Get sizes of all folders in the current directory |
## NOTE: when finding file by time, use one of the following flags: | |
# ctime : the time a file was changed, in hours. On most systems this timestamp cannot be altered by any user, so it is fairly reliable | |
# atime : the time a file was last accessed, in hours. This is also set by the system. | |
# mtime : the modified time of a file, in hours. This can be set by any user. So if you are looking for mailcious files, never use this flag. | |
# cmin : same as mtime, but in minutes. | |
# amin : same as atime, but in minutes. | |
# mmin : same as mtime, but in minutes. | |
# Find all files in current directory changed more than 8 hours ago (480 minutes) | |
find $PWD -mindepth 1 -type f -cmin +480 |