Skip to content

Instantly share code, notes, and snippets.

View JohnRiv's full-sized avatar
👋
Hello!

John Riviello JohnRiv

👋
Hello!
View GitHub Profile
@JohnRiv
JohnRiv / super-css-super-challenge.html
Created July 27, 2011 21:53
Super CSS Super Challenge Answer
<!DOCTYPE html>
<html>
<head>
<!--
A solution for the design at http://jsbin.com/super-css-super-challenge
Using no "active" class (but the middle is always "active" in the display).
I think that's how Chris Coyier presented it, but I may have missed the "active" class
-->
<style type="text/css">
body {
@JohnRiv
JohnRiv / get-elements-by-classname.js
Created September 23, 2011 17:41
getElementsByClassName that supports native browser implementation
if (typeof RIV === 'undefined' || !RIV) {
var RIV = {};
}
RIV.utils = (function() {
return {
/**
* Gets all the DOM elements that have a specified className. Uses the native browser function if it exists.
* @param {string} classname The classname you want to search for
* @param {string} node A selector to select the scope. Defaults to "document" if not specified.
@JohnRiv
JohnRiv / rb.py
Created April 25, 2012 13:58
Reviewboard "Reviewed By" Data
import requests
# If you don't have requests installed, installation instructions are at http://docs.python-requests.org/en/v0.10.7/user/install/
urls = ['URLS_FROM_reviewData.js_GO_HERE']
cookies = dict(rbsessionid='PASTE_YOUR_COOKIE_VAL_HERE')
reviewed = 0
notreviewed = 0
for url in urls:
@JohnRiv
JohnRiv / sassconf2013
Created October 13, 2013 14:57
Links from "Integrating CSS Lint, csscss & other command-line tools as Compass Extensions" talk at SassConf
Sample Project with install instructions - https://github.com/Comcast/compass-extensions-sample
CSS Lint - http://comcast.github.io/compass-csslint/
csscss - https://github.com/Comcast/compass-csscss
CSS Lint for Compass - http://comcast.github.io/compass-csslint/
csscss for Compass - https://github.com/Comcast/compass-csscss
@JohnRiv
JohnRiv / SassMeister-input.scss
Last active August 29, 2015 14:01
Generated by SassMeister.com.
// ----
// Sass (v3.3.7)
// Compass (v1.0.0.alpha.18)
// ----
// Inline-Block IE
/* Using a mixin */
@mixin inline-block {
display: inline-block;
*zoom: 1;
@JohnRiv
JohnRiv / _boot_requirejs_sync.html.erb
Created June 17, 2014 03:29
Code Coverage with RequireJS in Teaspoon, using this file and suite.boot_partial = "/boot_requirejs_sync"
<%
rails_config = Rails.application.config
require_options = {baseUrl: rails_config.assets.prefix}
require_options.merge!(rails_config.requirejs.user_config) if rails_config.respond_to?(:requirejs)
specs = @suite.spec_assets(false).map{ |s| "#{s.gsub(/\.js.*$/, "")}" }
require_options['shim'] ||= {}
specs.each {|s| require_options['shim'][s] = [@suite.helper] }
%>
@JohnRiv
JohnRiv / SassMeister-input-HTML.html
Created November 20, 2014 00:54
Generated by SassMeister.com.
<div class="sassy">Sassy!</li>
@JohnRiv
JohnRiv / SassMeister-input-HTML.html
Created November 20, 2014 01:28
Generated by SassMeister.com.
<div class="sassy">Sassy Philly!</li>
@JohnRiv
JohnRiv / Guardfile
Created March 25, 2015 19:07
Guard not working
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
## Uncomment and set this to only include directories you want to watch
# directories %w(app lib config test spec features)
## Uncomment to clear the screen before every task
# clearing :on
## Guard internally checks for changes in the Guardfile and exits.
@JohnRiv
JohnRiv / lrtf-polymer-workshop.md
Last active October 5, 2017 22:38
Introduction to Web Components & Polymer Workshop

Introduction to Web Components & Polymer Workshop

Hello! 👋

Thanks for coming to our hands-on introduction to Web Components & Polymer! If you stumbled onto this and weren't at the event, hopefully this is still of somewhat use :-)

This is all the materials that were required to get started: