Skip to content

Instantly share code, notes, and snippets.

View roblevintennis's full-sized avatar

Rob Levin roblevintennis

View GitHub Profile
@roblevintennis
roblevintennis / .gitconfig
Created November 3, 2011 16:54
gitconfig
[user]
name = My Name
email = me@gradecam.com
[color]
branch = auto
status = auto
diff = auto
interactive = auto
[github]
user = robin
@roblevintennis
roblevintennis / mocha_sample_project_install.sh
Created February 19, 2012 19:17 — forked from adomokos/mocha_sample_project_install.sh
Set up sample project with mocha
#!/bin/bash
function create_dir {
if [ ! -d $1 ];
then
mkdir $1
fi
}
echo "create the src directory..."
function remove_merged_git_branches {
# Following sed uses fact that current branch has a '*' in front of it
current_branch=$(git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/')
if [ "$current_branch" != "master" ]; then
echo "WARNING: You are on branch $current_branch, NOT master."
fi
echo "Fetching merged branches..."
git remote prune origin
# Gets remove & local merged branches (but not master, nutmeg, sugar7, current branch, etc.)

CSS Layout Debbuger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
svg { width:50px; height:50px; }
svg > path,
svg > use {
@roblevintennis
roblevintennis / gist:7347791c906a72c2e166
Last active August 29, 2015 14:08
Inline SVG with Cacheable External File Mixin
// Example using multiple colors with SVG Sprites .. see it in an example with:
// $ git clone -b svg-inline-experiments --single-branch https://github.com/unicorn-ui/Buttons.git Buttons && cd Buttons && npm install && pushd svg-builder && npm install && grunt && popd && grunt dev
@mixin svgColors($fillColor: false, $color: false, $patchCurrentColorForIE: false) {
@if $fillColor {
fill: $fillColor;
}
@if $color {
@roblevintennis
roblevintennis / gist:865de775fb988bfad9a1
Last active May 7, 2017 20:20
Responsive Inline SVGs Sass Mixin
$svg-container-namespace: '.svg-container';
//Give 'em' 1:1 responsive container by default
#{$svg-container-namespace} {
display: inline-block;
position: relative;
height: 0;
width: 100%;
padding: 0;
//Default for 1:1 aspect ratio
require 'fixjour'
require File.expand_path("./spec/spec_helpers/builders.rb")
include Fixjour
w = Workspace.find( YOUR_WORKSPACE_ID_HERE )
60.times { |n| create_story(workspace: w, title: n) }
user = User.find(ID_FOUND_IN_USERS_TABLE)
200.times { |n|
w = Workspace.new(:title => 'Workspace-' + n.to_s, :creator_team => 'buyer')
w.creator = user
w.save!
}

Gannon Cannons - SVG Splatter Blocks

Chris Gannon rocks at SVG animation. This is just me studying his stuff and a total buffoonery not to be taken seriously! Go look at Chris's original here: http://codepen.io/chrisgannon/pen/wKReBX as this is just a decomposition for me to figure out what the dude's doing cuz "imitation is the sincerest form of flattery" and all dat jazz :-)

A Pen by Rob Levin on CodePen.

License.