Skip to content

Instantly share code, notes, and snippets.

@tomysmile
tomysmile / mac-setup-redis.md
Last active March 18, 2024 22:12
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis
@dsherret
dsherret / jquery.regex-limit.js
Last active December 28, 2017 09:43
Limit input by regex
/*!
* Copyright 2014 - David Sherret
* MIT License
*/
// Limits an input to specific values without checking keycodes and without flickering the value.
//
// Example usage:
// $("input").limitRegex(/^[0-9]+\.?[0-9]{0,2}$/); -- limit to numbers, up to 2 decimal places
//