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
<script> | |
var span_Text = document.getElementById("spanFileDisplaycntrlID_14113 > a:nth-child(2)").innerText; | |
<script> | |
<video width="320" height="240" controls> | |
<source src='span_Text' type="video/mp4"> | |
</video> |
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
✔ 08:31 ~/weekly-typographic [master|✔] $ git log | |
commit f5ae701f7de24ec450ed771af9142735855c9d92 | |
Merge: 274a46a f8d5df7 | |
Author: Micah Rich <[email protected]> | |
Date: Tue Jul 5 20:59:20 2016 -0400 | |
Merge pull request #2 from micahbrich/2016-07-07 | |
changes strong html tags to h3's |
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
def index | |
sort_ruby_tweets($client.get_tweets("adgilfillan")) | |
end | |
def $client.get_tweets(user) | |
options = {:count => 200, :include_rts => true, :exclude_replies => true} | |
user_timeline(user, options) | |
end | |
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
(2..7).each do |num| | |
define_method("whip_#{num}") do | |
if ((self.age + num) < 30) | |
(eval("self.whip_#{num-1}") * 0.95) | |
else | |
(eval("self.whip_#{num-1}") * 1.05) | |
end | |
end | |
end |
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
class Pitcher < ActiveRecord::Base | |
attr_accessible :age, :name, :whip | |
alias :whip_1 :whip | |
(2..7).each do |num| | |
define_method("whip_#{num}") do | |
if self.age < 28 | |
eval("self.whip_#{num-1}") * 0.95 | |
else | |
eval("self.whip_#{num-1}") * 1.05 |
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
def whip2 | |
if self.age < 28 | |
self.whip * 0.95 | |
else | |
self.whip * 1.05 | |
end | |
end | |
def whip3 | |
if self.age < 28 |
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
<iframe src="http://player.vimeo.com/video/65822130" width="500" height="889" frameborder="0" | |
webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe> | |
<p><a href="http://vimeo.com/65822130">First Apartment</a></p> |
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
def login | |
if request.post? | |
user = User.find_by_email(params[:email]) | |
if ! user.nil? && user.password == params[:password] | |
session[:user_id] = user.id | |
progress_redirect | |
else | |
redirect_to(:back, :alert => "Invalid Email/Password.") | |
end | |
end |
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
def authenticate_self_or_admin | |
m = Member.find(session[:member_id]) | |
if m.role == 'Admin' | |
elsif session[:member_id].nil? | |
flash[:alert] = 'You need to login first.' | |
redirect_to(:controller => 'admin', :action => 'login') | |
elsif session[:member_id].to_s != params[:id] |
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
<ul id="navbar"> | |
<li><a href="/members/">Members</a></li> | |
<li><a href="/events/">Events</a></li> | |
<li><a href="/libraries/">Libraries</a></li> |
NewerOlder