Skip to content

Instantly share code, notes, and snippets.

View rjv's full-sized avatar

Roger Vandawalker rjv

View GitHub Profile
@rjv
rjv / gist:9092930
Created February 19, 2014 14:13
Ignore IE9 and below with a CSS selector. Anything with the .new-amazingness class will not apply to IE9 and below.
.new-amazingness:not(:required) {
/* hide boring defaults */
/* show modern amazingness */
}
@mixin rem($property, $values) {
// Create a couple of empty lists as output buffers.
$base-font-size: 16px; // should be consistent with your html/body font-size
$px-values: ();
$rem-values: ();
// Loop through the $values list
@each $value in $values {
// For each property value, if it's in rem or px, derive both rem and
// px values for it and add those to the end of the appropriate buffer.
@rjv
rjv / gist:4485823
Last active December 10, 2015 20:08
Bash Prompt
# PS1='\e[32m\t \e[33m\w \e[31m\$ \e[0m'
PS1="[\u@\[\e[0;31m\]\h\[\e[1;39m\] \W]: "
{
"files":
{
"jquery": "http://code.jquery.com/jquery.min.js",
"jquery-ui-effects": "https://raw.github.com/jquery/jquery-ui/master/ui/jquery.effects.core.js",
"jquery-mobile-vmouse": "https://raw.github.com/jquery/jquery-mobile/master/js/jquery.mobile.vmouse.js",
"jquery-flexslider": "https://raw.github.com/mbmufffin/FlexSlider/master/jquery.flexslider-min.js",
"jquery-mediaelement": "https://raw.github.com/johndyer/mediaelement/master/build/mediaelement-and-player.js",
"jquery-url": "https://raw.github.com/allmarkedup/jQuery-URL-Parser/master/jquery.url.js",
"jquery-dotimeout": "https://raw.github.com/cowboy/jquery-dotimeout/master/jquery.ba-dotimeout.min.js",
@rjv
rjv / gist:4741431
Last active December 12, 2015 08:08
Simple Google Analytics event tracking wrapper
var track = function(category, action, label) {
if (window.ga) {
ga('send', 'event', category, action, label);
}
else if (window._gaq) {
window._gaq.push(["_trackEvent", category, action, label]);
}
};
@rjv
rjv / gist:4949703
Created February 14, 2013 00:30
Stripped HTML5 Boilerplate
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<meta name="description" content="">
@rjv
rjv / gist:5058223
Created February 28, 2013 16:59
Binding a jQuery click w/Google Analytics event tracking
$(document)
.on("click", "a", function(){
track('My-Category', 'My-Name', 'My-Value');
});
@rjv
rjv / gist:5067369
Created March 1, 2013 20:08
Sitefinity Banners widget template
<%@ Control Language="C#" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.PublicControls.BrowseAndEdit" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.ContentUI" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.Comments" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.Fields" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI" Assembly="Telerik.Sitefinity" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<telerik:RadListView ID="dynamicContentListView" ItemPlaceholderID="ItemsContainer" runat="server" EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false">
<LayoutTemplate>
@rjv
rjv / gist:5372014
Created April 12, 2013 13:32
Clone Laravel 4 develop branch into current directory
git clone -o laravel -b develop https://github.com/laravel/laravel.git .
# Initial setup
git clone -o framework -b develop https://github.com/laravel/laravel.git project-name
cd project-name
git checkout --orphan master
git commit -m "Initial commit"
# Pulling changes
git fetch framework
git merge --squash -m "Upgrade Laravel" framework/develop
# Fix merge conflicts if any and commit