How To get_posts in WordPress with Multiple meta_query Values

Author: , October 13th, 2020

The first query gets all custom publication posts that have a value in field book_seq ordered by book_seq The second query gets all custom publication posts that have no meta value for book_seq or no meta record for key book_seq ordered by post_title.

Great article here: https://rudrastyh.com/wordpress/meta_query.html

How To Delete Lines Using PERL Edit In Place

Author: , March 23rd, 2020

Using PERL, we can easily do a search and replace across multiple files. perl -ni -w -e ‘print unless m/^gdb\d+/;’ yourFileSpec

How To Find Commits With Code Containing a String

Author: , February 7th, 2020

How To Make Firefox Focus on the URL not Search in a New Tab

Author: , September 5th, 2017

Set browser.autofocus to false in about:config

How To Find Non-ASCII Characters in Vi

Author: , July 7th, 2015

To search for non-ASCII characters: /[^\d0-\d127] Use the substitute function to clean them up: :%s/[^\d0-\d127]/ /g

How To Batch Search and Replace Multiple Files Using PERL

Author: , October 16th, 2014

Using PERL, we can easily do a search and replace across multiple files. perl -pi -w -e ‘s/SEARCH_FOR/REPLACE_WITH/g;’ FILE_LIST The following example will replace all occurrences of “hello” with “goodbye” inside files ending with .txt:

To handle special characters, use the hex value. For example, to convert MS web files that use control characters: […]

How to Re-Index Spotlight to Fix Email Search Bug

Author: , November 25th, 2009

sudo mdutil -E -i on / or You need to get Spotlight to reindex the mail folder (Home/Library/Mail), but you don’t have to mess about in terminal. From the Apple menu, choose System Preferences. Click Spotlight. Click the Privacy tab. Drag the folder to the list. Remove the item or volume you just added. ~or~ […]

How to Ignore Case During Searches in VIM

Author: , September 29th, 2009

To ignore case in the searches, enter the following command: :set ignorecase This command can be abbreviated as: :set ic To turn off this feature, use: :set noignorecase This command can be abbreviated as: :set noic