= social_link_to "Tweet", 'twitter', { url: object_url(@object), text: @object.title }, 'data-share' => 'twitter'
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Blog, ROR Lab. Lecture</title> | |
<%= stylesheet_link_tag "application", :media => "all" %> | |
<%= javascript_include_tag "application" %> | |
<%= csrf_meta_tags %> | |
</head> | |
<body> |
This file contains hidden or 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
body { | |
background:#336699 !important; | |
} | |
#header { | |
margin:0 auto; | |
width:80%; | |
text-align: right; | |
h1 { | |
margin-bottom:5px; |
This file contains hidden or 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
function __git_dirty { | |
git diff --quiet HEAD &>/dev/null | |
[ $? == 1 ] && echo "!" | |
} | |
function __git_branch { | |
__git_ps1 "%s" | |
} | |
function __my_rvm_ruby_version { |
This file contains hidden or 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
# MySQL. Versions 4.1 and 5.0 are recommended. | |
# | |
# Install the MYSQL driver | |
# gem install mysql2 | |
# | |
# Ensure the MySQL gem is defined in your Gemfile | |
# gem 'mysql2' | |
# | |
# And be sure to use new-style password hashing: | |
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html |
This file contains hidden or 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
# Custom field_error_proc | |
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance| | |
errors = Array(instance.error_message).join(', ') | |
if html_tag =~ /^<label/ | |
if html_tag !~ /^<label(?:\s+.*)*(\s+alt="(?:checkbox|hidden)")(?:\s+.*)*\s*/ | |
%(#{html_tag}).html_safe | |
else | |
%(#{html_tag}<span class="validation-error"> #{errors}</span>).html_safe | |
end | |
else |
This file contains hidden or 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
config.action_mailer.default_url_options = { host: "yourdomain.com" } | |
config.action_mailer.raise_delivery_errors = true | |
config.action_mailer.delivery_method = :smtp | |
config.action_mailer.smtp_settings = { | |
address: "smtp.gmail.com", | |
port: 587, | |
domain: "yourdomain.com", | |
authentication: "plain", | |
enable_starttls_auto: true, | |
user_name: ENV["GMAIL_USERNAME"], |
This file contains hidden or 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
table.bordered { | |
width:100%; | |
padding:0; | |
margin:0; | |
border-collapse:collapse; | |
th { | |
background: #cadcf3; | |
} | |
th, td { | |
border:1px solid #79b0e0; |
This file contains hidden or 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
ko: | |
date: | |
abbr_day_names: | |
- 일 | |
- 월 | |
- 화 | |
- 수 | |
- 목 | |
- 금 | |
- 토 |
This file contains hidden or 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
# The latest version of this script is now available at | |
# https://github.com/jasoncodes/dotfiles/blob/master/aliases/rbenv.sh | |
VERSION=1.9.3-p385 | |
brew update | |
brew install rbenv ruby-build rbenv-vars readline ctags | |
if [ -n "${ZSH_VERSION:-}" ]; then | |
echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.zshrc | |
else | |
echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.bash_profile |
OlderNewer