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
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script> | |
<script language="javascript" type="text/javascript" src="flot-flot-e2147c0/jquery.flot.js"></script> | |
<script language="javascript" type="text/javascript" src="flot-flot-e2147c0/jquery.flot.categories.js"></script> | |
</head> | |
<body> | |
<h1>Weather Statistics in Boston</h1> | |
<div id="placeholder" style="width:600px;height:300px"></div> |
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
== View | |
<% require 'will_paginate/array' %> | |
<% p = (1..1000).to_a.paginate %> | |
<%= will_paginate(p, :renderer => CarsHelper::CustomRenderer) %> | |
== CustomClass | |
module CarsHelper | |
# | |
# See: https://github.com/mislav/will_paginate/wiki/Link-renderer |
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
if [ -f $(brew --prefix)/etc/bash_completion ]; then | |
. $(brew --prefix)/etc/bash_completion | |
fi | |
source /usr/local/Cellar/git/1.8.2.3/etc/bash_completion.d/git-completion.bash | |
source /usr/local/Cellar/git/1.8.2.3/etc/bash_completion.d/git-prompt.sh | |
#GIT_PS1_SHOWDIRTYSTATE=true | |
#export PS1='\[\033[32m\]\u@\h\[\033[00m\]:\[\033[34m\]\w\[\033[31m\]$(__git_ps1)\[\033[00m\]\$ ' | |
hg_branch() { | |
hg branch 2> /dev/null | awk '{print " (hg:"$1""}' |
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 BootstrapLinkRenderer < WillPaginate::ActionView::LinkRenderer | |
def page_number(page) | |
unless page == current_page | |
tag(:li, link(page, page, :rel => rel_value(page))) | |
else | |
tag(:li, link(page, "#"), :class => 'active') | |
end | |
end | |
def link(text, target, attributes = {}) |