How to Mass Unfollow on Twitter

Have you ever wanted to remove some of your followers on twitter? Twitter does not provide a native way to do this, but you can automate it in your browsers developer console.

Steps:

  1. Login to your Twitter account and go to your follower’s page (https://twitter.com/following)
  2. Open developer tools in your Chrome browser CMD+Option+C (Mac) or Control+Shift+C (Windows, Linux, Chrome OS)
  3. Go to the Console tab
  4. Paste in the code below and press enter
$('.unfollow-text').trigger('click')

This command will find all the unfollow buttons on the page and click them. So however many followers you have displayed will be immediately unfollowed.

 

I thought this was a neat trick to clean up your followers. Hope you find it useful.

Debugging Go Error

After a recent upgrade to macOS Mojave, my machine was not able to debug in GoLand due to the error below:

could not launch process: exec: "lldb-server": executable file not found in $PATH

To fix this you have to install xcode-select, a command-line utility on macOS: Type in the command below into your terminal to install xcode-select.

xcode-select --install

After installing xcode-select, everything was working.

How to Exclude Files from a Zip Archive

When zipping a folder using the command line in macOS, you may have noticed certain files are include such as DS_Store and __MACOSX are included. With a few command arguments, these files can be filtered out.

Exclude All Hidden Files

zip -r zipFolderName.zip pathToFolder -x "*.*"

Exclude .DS_Store and __MACOSX

zip -r zipFolderName.zip pathToFolder -x "*.DS_Store" "__MACOSX*"

Exclude all jpegs

zip -r zipFolderName.zip pathToFolder -x "*.jpegs"

Hopefully this helps you filter out unwanted files when zipping folders in macOS.

Laravel, Cloudflare and Trusted Proxies

When using Cloudflare to manage your site, you may notice that if you check the ip address of the request, it will be an ip address from Cloudflare. This is happening because Cloudflare is proxying the request to your server. To get around this issue and get the original request ip, you need to configure trusted proxies in Laravel.

This is important because the throttle middleware checks the request ip and throttles based on ip. If all request look like they are coming from Cloudflare, this will cause issues. Read More