pry -r ./config/app_init_file.rb
-- load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb
-- load your rails into a pry session
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
#!/usr/bin/env ruby | |
# | |
# Homebrew fix 1 - osxfuse dylibs | |
# | |
# original solutions: https://gist.github.com/aaronzirbes/3239033 | |
# https://gist.github.com/trinitronx/5437061 | |
# | |
# Fixes the following: | |
# | |
# > Warning: Unbrewed dylibs were found in /usr/local/lib. |
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
var jq = document.createElement('script'); | |
jq.src = "//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
jQuery.noConflict(); |
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
/ This partial allows you to render the Coderwall badges of specified user | |
/ | |
ruby: | |
username = 'your-coderwall-username' | |
orientation = 'horizontal' # can be 'vertical' or 'horizontal' | |
/ Place the following tags in the HEAD section of your web page (omit jQuery if already present, of course) | |
link href="http://coderwall.com/stylesheets/jquery.coderwall.css" media="all" rel="stylesheet" type="text/css" | |
script src="https://code.jquery.com/jquery-2.1.1.min.js" | |
script src="http://coderwall.com/javascripts/jquery.coderwall.js" |
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
- pages = sitemap.resources.find_all{|p| p.source_file.match(/\.html/) } | |
doctype xml | |
urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" | |
- pages.each do |p| | |
url | |
loc "http://www.YOUR_WEBSITE_URL/#{p.destination_path.gsub('/index.html','')}" | |
lastmod = Date.today.to_time.iso8601 | |
changefreq = p.data.changefreq || 'weekly' | |
priority = p.data.priority || '0.5' |
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
body.loading:after { | |
/* with no content, nothing is rendered */ | |
content: ""; | |
position: fixed; | |
/* element stretched to cover during rotation an aspect ratio up to 1/10 */ | |
top: -500%; | |
left: -500%; | |
right: -500%; | |
bottom: -500%; | |
z-index: 9999; |
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
/ Integrate Disqus comments into your site with this widget (adheres to official API and config spec) | |
/ | |
/ @see https://help.disqus.com/customer/portal/articles/1104788-web-integration Official web integration docs | |
/ @see https://help.disqus.com/customer/portal/articles/472098-javascript-configuration-variables Configuration docs | |
/ | |
/ @local [Hash{Symbol => String}] disqus Key/value pairs corresponding to the Disqus JS configuration variables | |
/ @option disqus [String] shortname Unique identifier for your forum website registered on Disqus.com (REQUIRED) | |
/ @option disqus [String] identifier A String or Integer value which identifies the current web page thread | |
/ @option disqus [String] title Title of the current page; defaults to value of HTML `title` element | |
/ @option disqus [String] url URL of the current page; defaults to `window.location.href` |