How to Resize Multiple Images at Once
mogrify *.jpg -scale 50% *
mogrify *.jpg -scale 50% *
If you are working with your server, ex: sending some file now and then with SSH, you can experience some annoying connection losses. Actually, if SSH has been idle for a while the connection will be closed.
You can prevent this easily adding a config file with just 2 lines of code to your .ssh folder in your home.
nano ~/.ssh/config
Host *
ServerAliveInterval 30
Note: in Ubuntu TCPKeepAlive is active by default.
If you want to show and mark up a single line of code in your HTML just use the code tags, however with multiple lines you need to surround the code tags with pre tags.
In WordPress comments, pre tags are not allowed by default (externally) no matter if you write them, WP will remove them. You need to add a hook to the end of your funtions.php file (Apparence/Theme Editor)
// Create function which allows more tags in comments
function allow_html_attributes_in_comment() {
global $allowedtags;
$allowedtags['pre'] = array('class'=>array());
}
// Add WordPress hook to use the function
add_action('init', 'allow_html_attributes_in_comment', 11);
This will let your users to happily post their indented code 🙂
I’ve reported 2 bugs that are afecting Chromium browsers:
Please consider starring them to solve these issues as soon as possible 🙂
Xiaomi is a great phone brand, outstanding performance and price with a good finished, however is a little bit tricky for developers: some options are not at first sight and you have to check extra permissions.
Similar to other Android phones first of all you have to enable Developer Options:
Extra for Xiaomi:
1. Switch On Install via USB: it will make you activate your Mi Account using your phone number. If you don’t do it, you will not be able to debug/install your app and will get an error as follow:
Failure [INSTALL_FAILED_USER_RESTRICTED: Install canceled by user]
2. USB debbuging (Security settings) will open 3 Important Warning dialogs with a default timer (countdown) to make you read it before press Next. At the end, if you haven’t rejected them the option will switch on. If you don’t do it, you will not be able to debug/install your app and will get an error as follow:
Failed to execute shell command "input,keyevent,82"" on device: Error: adb: Command failed with exit code 137
Note: I’m developing with Apache Cordova and Xiaomi Mi.