One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
#!/usr/bin/env ruby | |
# | |
# This is a web scraper which downloads mp3 files from the TATW web archives. | |
# | |
# Usage: run this script and pass it an episode range to download via arguments | |
# | |
# Dependencies: requires 'aria2' to be installed (uses the CLI tool 'aria2c') | |
# | |
require 'pathname' | |
require 'colorize' # Use of this gem is optional; it makes the output prettier |
# | |
# FUNCTIONS | |
# | |
# Test the first argument of a command for a git host identifier (aliases configured in ssh-config) | |
is_git_host() { | |
case "$1" in | |
'gh') host='github-personal' | |
user='SteveBenner' | |
true ;; |
# This tag allows you to load one or more font families into your page via the Google Fonts API | |
# | |
# @see https://developers.google.com/fonts/ The Web Fonts Project | |
# @see http://www.google.com/fonts Google Fonts Repository | |
# | |
# @note This tag MUST be placed in the <head></head> section of your webpage. | |
# | |
# @overload google_fonts(family) | |
# Load a single font family in the default 'normal' style | |
# @param [String, Symbol] family Name of a single font family to load |
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 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 is a Slim recreation of the Flatdoc example template provided here: | |
/ https://raw.githubusercontent.com/rstacruz/flatdoc/gh-pages/templates/template.html | |
/ | |
/ Flatdoc is a simple way to generate a documentation page from Markdown | |
/ More info is available on their website: http://ricostacruz.com/flatdoc/ | |
/ | |
/ The main alterations noticeable in this version of the template are: | |
/ - Emphasis is placed on using variables and interpolation often, key advantages of Slim | |
/ - The GitHub button links have been replaced with a Web Component version, which I | |
find to be superior to using an iFrame. Just uncomment the original code to revert. |
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 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 |
- 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' |