Skip to content

Instantly share code, notes, and snippets.

View esteedqueen's full-sized avatar
😼

Esther Olatunde esteedqueen

😼
View GitHub Profile
@esteedqueen
esteedqueen / show.html.erb
Created June 6, 2016 11:55 — forked from davidphasson/show.html.erb
ERB and the case statement
# Doesn't work
<p>
<% case @request.author_hosted %>
<% when "yes" %>
The school <b>has</b> hosted an author before.
<% when "no" %>
The school <b>has not</b> hosted an author before.
<% end %>
</p>
@esteedqueen
esteedqueen / Gemfile
Created May 23, 2016 12:10 — forked from chocnut/Gemfile
iOS AC + Social(Facebook) Framework & Rails(omniauth-facebook)
gem 'devise'
gem 'omniauth-facebook'
@esteedqueen
esteedqueen / Redis Cloud overview.md
Created November 13, 2015 16:34 — forked from Yiftach/Redis Cloud overview.md
Heroku - Redis Cloud overview

Redis Cloud is a fully-managed service for running your Redis dataset. You can quickly and easily get your apps up and running with Redis Cloud through its add-on for Heroku, just tell us how much memory you need and get started instantly with your first Redis database. You can then add as many Redis databases as you need (each running in a dedicated process, in a non-blocking manner) and increase or decrease the memory size of your plan without affecting your existing data. You can easily import an existing dataset to any of your Redis Cloud databases, from your S3 account or from any other Redis server. Daily backups are performed automatically and in addition, you can backup your dataset manually at any given time.

Getting started

Start by installing the add-on:

:::term

$ heroku addons:add rediscloud

@esteedqueen
esteedqueen / filterable.rb
Created November 10, 2015 01:00 — forked from justinweiss/filterable.rb
Filterable
# Call scopes directly from your URL params:
#
# @products = Product.filter(params.slice(:status, :location, :starts_with))
module Filterable
extend ActiveSupport::Concern
module ClassMethods
# Call the class methods with the same name as the keys in <tt>filtering_params</tt>
# with their associated values. Most useful for calling named scopes from