You can do this simply with an onclick event like below.
Add an Image to the DOM Dynamically
This example will work fairly well cross-browser. In IE it will use new Image and everything else it will use createElement. There are bugs in
Select Last N Characters of a Field
Using the substring function, this example below will select the leftmost 6 characters from a string field named “field_name” in the table tbl_stuff with mysql.
How to Remove Duplicate Lines From a Text File In Linux
You can combine the sort and uniq command line programs to remove duplicate lines from a text file. In the example below, it will produce
How to Jump to a Line Number in VI Editor
To go to a specific line number in VI, first, make sure you’re not in editing mode by hitting ESC. Next type the line number
Seeing Full Warnings That Just Happened After a Query
After you run a query on MySQL server you may get warning messages. To see the complete warnings you simply run the command show warnings.
How To Check the SHA Hash of Files
When you download software online often the publisher will also provide a file hash to make sure that the file hasn’t been modified or hacked
Search Emails With Specific Attachment File Types in Gmail
These examples show you how to easily search your Gmail for emails with particular file types as attachments. Find emails with .xlsx attachments Find emails
Find Active SSH Servers on a Subnet
This example lists out the IPs that are on the SSH port (22) on a particular subnet. List out IPs (only) of open ssh ports
Using the Linux Shutdown Command
Here are a few shutdown examples for quick reference. Turn Server Off Immediately Restart Immediately Restart in 45 minutes Restart at next 1 am Restart