Skip to content

Instantly share code, notes, and snippets.

View GaganGupta19's full-sized avatar
🎯
Focusing

Gagan Gupta GaganGupta19

🎯
Focusing
View GitHub Profile
@tomysmile
tomysmile / memcached_macosx.md
Created April 26, 2016 13:27
Installing memcached on Mac with Homebrew and Lunchy

Installing memcached on Mac with Homebrew and Lunchy

This is a quick guide for installing memcached on a Mac with Homebrew, and starting and stopping it with Lunchy. I hope this tutorial will get your memcached up and running in no time.

Step 1 β€” Install Homebrew

Installing Homebrew is super easy. Just paste this in your terminal β€”

$ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@staltz
staltz / introrx.md
Last active July 19, 2025 08:08
The introduction to Reactive Programming you've been missing
@bluemont
bluemont / url_validator.rb
Created June 25, 2012 04:27
ActiveModel URL Validator
class UrlValidator < ActiveModel::EachValidator
def validate_each(record, attribute, value)
valid = begin
URI.parse(value).kind_of?(URI::HTTP)
rescue URI::InvalidURIError
false
end
unless valid
record.errors[attribute] << (options[:message] || "is an invalid URL")