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.
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 is a humble web design tool inspired by the eyedropper functionality in Google Chrome's | |
color picker interface (part of the dev tools panel) which allows one to choose any pixel of | |
the current web page to set as a color property's value. Though hugely convenient for visual | |
design, color selection being limited to the context of the page leaves much to be desired. | |
/ This partial solves the limitation by affixing an unobtrusive panel to your page to act as | |
a makeshift color palette to use in conjunction with the eyedropper. The panel is populated | |
with small squares representing a list of colors passed into the partial via local. Viola! | |
/ @local [Array<String>] colors List of values valid for `background-color` CSS property |
#!/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 |
# The 'github_api' gem is implicility assumed to have been loaded at this point... | |
# Configuration data is passed to Github::Client#new as a Hash whose keys are Symbols | |
CONFIG_DATA = { | |
user: 'github-username', | |
login: '[email protected]', | |
oauth_token: 'personal-access-token' # one of many valid authentication methods (see the gem docs for more) | |
} | |
# Data is returned from the API as a Github::ResponseWrapper object |
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 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. |
I use the following regexes with [iTerm2][iterm]'s ['trigger' feature][it1] to create some basic syntax highlighting.
(?<=- )([A-Z][A-Z ]+:)+
Colorize CONSTANTS
Magenta
(?<=- )(:|")\w*"?(?= =>)
Colorize :keys =>
/ "keys" =>
Yellow
^([^=]*)(?==)
Colorize ENV_VARS
Cyan
(?<=[^=])=
Colorize the =
separator Dark Grey
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 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" |