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
ruby: | |
google_analytics_key = 'UA-XXXXXXXX-X' # your key may have more or less characters | |
page_title = '' | |
page_description = '' | |
doctype html | |
== conditional_html_tags_for_ie_versions 7..8, lang: 'en' | |
head | |
meta charset="utf-8" | |
meta http-equiv="X-UA-Compatible" content="IE=edge; chrome=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
/ This template produces an EXACT replica of the `index.html` file found in HTML5 Boilerplate v4.3.0 | |
/ The official distribution is located at: https://github.com/h5bp/html5-boilerplate/blob/v4.3.0/index.html | |
/ | |
/ For a more elegant way to generate the HTML tags within IE conditional comments, see the abstraction | |
/ in my gist at: https://gist.github.com/SteveBenner/a71f41e175f135b7d69b | |
/ | |
doctype html | |
/ The min and max values of the version range actually represent all values below or above the limit | |
- ie_versions = 6..9 # A minimum value of 6 for example, translates into 'less than 7' | |
- for version in ie_versions |
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
doctype html | |
== conditional_html_tags_for_ie_versions 7..8, lang: 'en' | |
head | |
meta charset="utf-8" | |
meta http-equiv="X-UA-Compatible" content="IE=edge; chrome=1" | |
title = page_title | |
meta name="description" content=page_description | |
meta name="viewport" content="width=device-width, initial-scale=1" | |
/ Normalize - front end standardization | |
= stylesheet_link_tag 'vendor/normalize' |
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
/ Official Google Analytics tracking code (updated 2014-10-23) | |
/ | |
/ @option [String] google_analytics_key GA key in a format similar to: 'UA-XXXXXXXX-X' | |
/ | |
- if google_analytics_key | |
javascript: | |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); |
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 | |
# | |
# This bit of code lets you define Environment variables in your shell via a YAML file. | |
# It works by composing Bash commands from the parsed data, meant to be executed within | |
# a Bash environment, which will export the variables just as in a regular Bash profile. | |
# This is accomplished by executing this script via the Bash substitution syntax $(...) | |
# which returns the output of evaluating whatever is inside the parenthesis, which in | |
# the case of this script would be appropriate 'export' commands that are run by Bash. | |
# | |
# This version is designed to parse aliases organized under named groups in the YAML |
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 | |
# | |
# If you've got a collection of Bash aliases that just keeps growing... Consider using YAML! | |
# | |
# This version is designed to parse aliases organized under named groups in the YAML | |
# file, so the first level of mappings are purely semantic, and are used to keep the | |
# data organized and well-documented. | |
# | |
require 'pathname' | |
require 'yaml' |
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 | |
# | |
# Mac fix 4 - Disable CrashReporter | |
# | |
# CrashReporter is a daemon that monitors for crashes and generates a report (duh) when they occur. | |
# If an application (such as Finder) become stuck in an infinite crash loop, then sometimes it's | |
# desirable to just turn off CrashReporter entirely, as it will continually generate processes in | |
# the background which spew errors and logs, resulting in massive overhead to your system resources. | |
# | |
# DIAGNOSING: |
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
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; |