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 🙂
Prevent SSH from disconnecting
/in Tooling/by GénesisIf 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.
Note: in Ubuntu TCPKeepAlive is active by default.
Multiple lines of code indented in WordPress Comments
/in HTML5, Tooling/by GénesisIf 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)
This will let your users to happily post their indented code 🙂
Split
/in JavaScript/by GénesisSplits a string into an array of strings, without any JavaScript method at all.
Butaquin Heating
/in App, Design/by GénesisHeating system for cinema seats using radio frequency modules. The seats carry a device to control their temperature remotely. The person in charge of the accommodation can select any individual seat, group or area and define temperature during a specific time schedule.
From Datalist to Awesomplete
/in CSS3, HTML5, JavaScript/by GénesisTemporal fix for apps using Datalist on Chrome/WebView with Android 8 or higher.
You can help and/or follow the reported bug here.