Skip to content

Instantly share code, notes, and snippets.

View mdunham's full-sized avatar
:bowtie:
#OverReacted

Matthew Dunham mdunham

:bowtie:
#OverReacted
View GitHub Profile
@mdunham
mdunham / zone-scrape.js
Created April 24, 2017 19:52
Scrape WHM DNS zone file editor and compare with another WHM zone
/**
* WHM DNS Zone Scraper
*
* There are two steps to the process first login to WHM and start esiting the zone
* file you want to sync from and run the first script beloew.
*
* Take the output of that script and pass it as JSON to the oldEntries var on part 2.
* Now run part two while editing the DNS zone to the target domain. This will
* output the DNS entries that are not in the current zonefile in proper zone format
*
@mdunham
mdunham / console.js
Last active February 20, 2017 06:46
This is was a quick little console script I wrote to help me regenerate the thumbnails of only the posts or in this case products specified.
// HTML: add the tag: <iframe id="f" src="" width="900" height="600"></iframe>
// Then run the following in the console:
var
// Array of wp_posts ID's that need their thumbnails regenerated
ids = ["328921", "326496", "322847", "21967", "16180", "16173"],
// Prevent handling the onload event at the wrong time
loaded = false,
@mdunham
mdunham / new-password.js
Last active June 11, 2017 10:48
Mass change all cpanel and user passwords in WHM
/**
* Utility for updating all domain and user cpanel passwords
*
* To use it login to your WHM and click on "Account Functions" then click on "Password Modification"
* Now copy all of the code below and paste it into your browsers dev tools console
* DO NOT FORGET before you run the code make sure you change the variable newPass on line 14 to what
* you want all the new passwords to be now just press enter and let it do its magic
*
* @author Matthew Dunham <matt@matthewdunham.net>
*/
@mdunham
mdunham / Delete-Facebook-Messages.js
Last active May 18, 2017 18:28
Easier way to delete all your Facebook messages at once.
/**
* Auto Delete All Facebook Messages
*
* You can run this code from the console, but the best way to run it is by
* saving it as bookmark in your bookmark bar. Look at the gists comments for
* instructions on how to save it as a bookmark.
*
* @link http://matthewdunham.net
* @link http://linkedin.com/in/matthewdunham
* @author Matthew Dunham <matt@matthewdunham.net>
@mdunham
mdunham / Create Delete All Messages Button
Last active May 1, 2022 03:08
How to delete all Facebook conversations easily. The script to be run inside Chrome's JavaScript console to delete all the messages and conversations from your Facebook inbox. Instruction: 1 - open your Facebook inbox folder https://www.facebook.com/messages/ 2 - open the Chrome JS console (ALT+CMD+J on Mac OS X) 3 - paste the script and press e…
Simple Method
An easier way to run the script is by simply creating a bookmark in your browser using the following:
Completely, safe.
Bookmark Name: Delete All FB Conversation
Bookmark Url : javascript:!function(){var e=function(o){var n=function(e){var o=function(){var o=document.querySelector("#webMessengerHeaderName").innerText,n=function(e){for(var n=0;n<e.length;n++){var t=e[n];if(-1!==t.innerHTML.indexOf("Delete Conversation"))return console.log("Deleting Messages From: "+o),t.click(),!0}return!1};if("No Selection"===o)return void l();if(!0===n(document.querySelectorAll('a[role="menuitem"]')))setTimeout(t,500);else{var r=document.querySelector('button[data-tooltip-content="Actions"]');if(!r)return void console.log("Unable to locate the delete button");r.click(),setTimeout(e,2e3)}},n=function(){var e=document.querySelector("div.uiScrollableAreaWrap.scrollable");return"undefined"==typeof e||!1===e.hasOwnProperty("scrollHeight")?(console.log("Unable to locate the messages scroll region"),!1):void(e.scro