Here is a very basic HTML tag converter (to lower case): Left click Search->Replace (or CTRL H). Enter the following in the appropriate fields: Find what: <([^>]+?)> Replace with: <\L\1> Left click Replace All. Done
Create a PHP file with the content: <?php $filecontent = file_get_contents ( ‘report.html’ ); $filecontent = preg_replace ( ‘/(<(?!img)w+[^>]+)(style=”[^”]+”)([^>]*)(>)/’, ‘${1}${3}${4}’, $filecontent ); echo $filecontent; ?> If you have access to your linux server’s terminal, run the the following command: php regex.php > new.html If not, you can run the php file in browser and press Ctrl-U […]
Create a PHP file with the content: <?php $filecontent = file_get_contents(‘index.html’);$filecontent = preg_replace(‘/ .*”.*”/’, ”, $filecontent); echo $filecontent; ?> If you have access to your linux server’s terminal, run the the following command: php regex.php > new.html If not, you can run the php file in browser and press Ctrl-U to view the source code, then […]
Install Text editor – Vim from here Open the file you like to modify in Vim. Enter the following for convert to uppercase :%s/</=(w+)>/U&/g Enter the following for convert to lowercase :%s/</=(w+)>/L&/g
Referenced from this article.
Here is source code to check Android device rooted.
/** * Checks if the device is rooted. * @return <code>true</code> if the device is rooted, <code>false</code> otherwise. */
Referenced from Jean-Baptiste Jung
Cheat sheet : Download here
Basics
| :e filename | Open filename for edition |
| :w | Save file |
| :q | Exit Vim |
| :q! | Quit without saving |
| 😡 | Write file (if changes has been made) and exit |
| :sav filename | Saves file as filename |
| . | Repeats the last change made in normal mode |
| 5. | Repeats 5 times the last change made in normal mode |
Moving in the file
| k or Up Arrow | move the cursor up one line |
| j or Down Arrow | move the cursor down one line |
| e | move the cursor to the end of the word |
| b | move the cursor to the begining of the word |
| 0 | move the cursor to the begining of the line |
| G | move the cursor to the end of the file |
| gg | move the cursor to the begining of the file |
| L | move the cursor to the bottom of the screen |
| :59 | move cursor to line 59. Replace 59 by the desired line number. |
| 20| | move cursor to column 20. |
| % | Move cursor to matching parenthesis |
| [[ | Jump to function start |
| [{ | Jump to block start |
Cut, copy & paste
| y | Copy the selected text to clipboard |
| p | Paste clipboard contents |
| dd | Cut current line |
| yy | Copy current line |
| y$ | Copy to end of line |
| D | Cut to end of line |