Skip to content

Instantly share code, notes, and snippets.

View mooru's full-sized avatar

Martin Oru mooru

View GitHub Profile
@mooru
mooru / video-embed.html
Created October 29, 2016 12:42 — forked from robneu/video-embed.html
Embed a YouTube video using featherlight.js
<a href="https://www.youtube.com/embed/CEYRBTZWu8U" data-featherlight="iframe" data-featherlight-iframe-width="960" data-featherlight-iframe-height="540">
<img class="alignnone" src="http://img.youtube.com/vi/CEYRBTZWu8U/maxresdefault.jpg" alt="" width="1280" height="720" />
</a>
@mooru
mooru / gist:7301942
Created November 4, 2013 12:45
Members DB
class Church < ActiveRecord::Base
has_many :members
has_many :memberships, through: :members
has_many :genders, through: :members
has_many :ministries, through: :members
has_many :ages, through: :members
has_many :occupations, through: :members
has_many :marital_statuses, through: :members
has_many :departments, through: :members
<h2><%= link_to 'Membership Profile', members_url %></h2>
<%= simple_form_for @member do |f| %>
<%= f.input :first_name %>
<%= f.input :middle_name %>
<%= f.input :last_name %>
<%= f.input :address %>
<%= f.input :tel_no, placeholder: 'best contact phone number', hint: 'Add 234 to your number'%>
<%= f.input :email, placeholder: 'enter a valid email' %>
<%= f.input :gender_id, collection: ['Male', 'Female'] %>
<%= f.input :birth, as: :date, start_year: Date.today.year - 57,
@mooru
mooru / dabblet.css
Created March 25, 2013 13:05
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
body{
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
}
p:nth-child(2n){