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.

Seth’s First, ten

Seth’s post titled First, ten from back in 2009 is still relevant today. If you are building a product, finding your first ten users can be challenging but they are the first step to 100 then a 1,000 and so on.

Plan on the gradual build that turns into a tidal wave.

Be patient and stay motivated. Three years ago when I made the first commit for my weather extension, I never could have imaged it would have grown to over 200,000 active users. I was focused on the first 10 users and listened to their feedback. With many ups and downs, it has been a great journey so far. Here’s to another new year!

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

How to View Source Code of an Extension

Browser extensions are composed of Javascript, HTML, CSS, and images. Before installing any extension I will usually review the source code. This is important to verify that an extension is not doing anything malicious. Luckily, viewing the source code is simple if you use the CRX Viewer. (source)

  1. Browse to the extension install page and copy the URL of the extension. (example)
  2. Go to https://robwu.nl/crxviewer/ and paste in the URL. (example)
  3. You can review the code in your browser or download all files and review in your text editor.

Read More