This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo passwd username | |
------------------- hardware info | |
Battery Info | |
upower -i /org/freedesktop/UPower/devices/battery_BAT0 | |
acpi -V | |
less a.txt less is show text file faster than vim or more | |
more a.txt text editor ? | |
------------------ | |
how copy folder with content |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// http://ascii-table.com/ansi-escape-sequences.php | |
// http://ascii-table.com/ansi-escape-sequences-vt-100.php | |
// "\033[?25l" Hide the cursor. | |
// "\033[?25h" Show the cursor. | |
// "\033[K" Delete everything from the cursor to the end of the line. | |
// echo '1-Start Line', "\n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// http://jeffreysambells.com/2012/10/25/human-readable-filesize-php + some edit | |
// https://gist.github.com/liunian/9338301 | |
function human_filesize($bytes, $decimals = 2) | |
{ | |
if ($bytes < 1024) { | |
return $bytes . ' B'; | |
} | |
$factor = floor(log($bytes, 1024)); |
NewerOlder