How To Create a PayPal-styled Button Using CSS and HTML

Author: , August 31st, 2018

1 <button class="paypal-btn large" onclick="window.location=’’;return false">What a Great Button</button> <button class=”paypal-btn large” onclick=”window.location=’’;return false”>What a Great Button</button> 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 […]

How To Display Blog Pages for a Single Category

Author: , August 6th, 2018

Create a new page and set the page template to Blog. Add a new Custom Field to the page. Set the Name to the string query_args and the value to cat=NNN, where NNN is the ID of the desired category. Be sure to click Publish or Update when done. You can locate the Category ID […]

How To Revert All Changes in a git Branch

Author: , August 2nd, 2018

git checkout -f

How To Disable WordPress wpautop for Shortcodes

Author: , June 15th, 2018

remove_filter( ‘the_content’, ‘wpautop’ ); add_filter( ‘the_content’, ‘smart_autop’ ); function smart_autop($content) { $post = get_post(); if($post->post_type != ‘post’) return $content; // if not a post, leave $content untouched return wpautop($content); }

How To Select Rows in MySQL with No Matching Entry in Another Table

Author: , May 16th, 2018

SELECT FROM tableOne t1 LEFT JOIN tableTwo t2 ON = WHERE IS NULL The “WHERE IS NULL clause” restricts the results to only those rows where the id returned from tableTwo is null. will be NULL for all records from tableOne where the id is not found in tableTwo.

How To Move Around in Linux CLI Mail

Author: , May 7th, 2018

h Shows you a screenful of message headers (a “header” being the number, sender, date, size and subject). h with no message number shows the current screenful of messages (the number that make up a screenful is set with the screen variable, described below). h$ shows you the last screenful of messages — which is […]

How To Locate Attached Disk Devices in Linux

Author: , April 24th, 2018 # lsblk -a 1 2 3 4 5 NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT nvme1n1       259:0    0  100G  0 disk /volumes/data nvme0n1       259:1    0   20G  0 disk ├─nvme0n1p1   259:2    0   20G  0 part / └─nvme0n1p128 259:3   […]

How To Move in vim Using the Keyboard

Author: , March 21st, 2018

h move one character left j move one row down k move one row up l move one character right w move to beginning of next word b move to previous beginning of word e move to end of word W move to beginning of next word after a whitespace B move to beginning of […]

How To Scroll to the Top of the Page using Javascript

Author: , March 20th, 2018

window.scrollTo(x-coord, y-coord); Example: window.scrollTo(0,0);

How To Expand a Filesystem on AWS Linux

Author: , March 6th, 2018 This only works on the new expandable volumes. YMMV, as always. 1. Examine file -s /dev/xvd* lsblk df -h 2. Grow partition Expand the modified partition using growpart (and note the unusual syntax of separating the device name from the partition number): growpart /dev/xvda 1 lsblk 3. Expand filesystem resize2fs /dev/xvda1 df -h