Skip to content

Instantly share code, notes, and snippets.

View RobertEves92's full-sized avatar

Robert Eves RobertEves92

  • Hertfordshire, United Kingdom
View GitHub Profile
@RobertEves92
RobertEves92 / archive.js
Last active September 26, 2020 07:56
Archive all Facebook messenger chats
(function run() {
let all = document.querySelectorAll('div[aria-label="Conversation actions"]');
if (all.length == 0) return;
let a = all[0];
a.click();
setTimeout(() => {
document.querySelectorAll('a[role=menuitem]').forEach(act => {
if (act.innerText.match(/Hide/)) act.click();
});
run();
How to replace text everywhere in Git
There is a Git command, filter-branch, which works wonders for changing the history of a repository, but it’s difficult to use because it forces you to know how Git works under the hood. Instead there is this little free tool, BFG Repo-Cleaner, which is intuitive, fast and recommended.
Check that there are some occurrences of your string
The first thing to do is to check that the repository contains the string you want to replace with another string. This will help later to make sure you effectively replaced it.
andrea at Lock-and-Stock in ~/dev/ruby
$ git clone [email protected]:aercolino/your-repository.git
andrea at Lock-and-Stock in ~/dev/ruby