You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Detect Israeli Kosher phone numbers with JavaScript
Detect Israeli Kosher Phone Numbers
Based on a code sample provided to me by Avi Marcus.
// Valid as of 2018-10-19// https://en.wikipedia.org/wiki/Telephone_numbers_in_Israel#Kosher_numbersconstKOSHER_PHONE_MOBILE_REGEX=/^0(5041|5271|5276|5331|5341|5484|5485|5567|5571|5598|5832)\d{5}$/;constKOSHER_PHONE_FIXED_REGEX=/^0([23489]80\d{5}|7229\d{5}|73724\d{4})$/;
These CSS classes will size any square SVG to match the default TailwindCSS font sizes.
Great for mixing icons with text on buttons and headings.
The icon sizes were manually picked, so they match my taste. Your mileage may vary!
I've also added sizes that are larger than Tailwind's max font size for really big icons in hero sections and the like
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWS Lambda - Upload node_modules without devDependencies
By default, ZIPing the project directory will included all of your devDependencies. slowing your upload speed to a crawl as you upload an enormous bundle containing 80% useless code (unless you're testing in production™ )
You only need your production dependencies when deploying, but need you devDependencies for development. But you have to deploy from the same directory, and it must be named node_modules. How can slim down the ol' deploy bundle?
Here's a horrible but effective hack that accomplishes this:
We'll create an additional directory called node_modules__prod for storing production dependencies.
When we deploy we swap the names of the dev and production node_modules directories 😱, so the deploy tool stupidly uploads what it thinks is our full node_modules but actually is our production-only modules directory.
When deploy is done (or fails) we swap the directory names again, restoring us back to developme