Skip to content

Instantly share code, notes, and snippets.

View rosswarren's full-sized avatar
⌨️
typing

Ross Warren rosswarren

⌨️
typing
View GitHub Profile
@nicferrier
nicferrier / gist:2277987
Created April 1, 2012 19:34
Clone a git repo if it does not exist, or pull into it if it does exist
#!/bin/sh
REPOSRC=$1
LOCALREPO=$2
# We do it this way so that we can abstract if from just git later on
LOCALREPO_VC_DIR=$LOCALREPO/.git
if [ ! -d $LOCALREPO_VC_DIR ]
then
@tobiashm
tobiashm / sass_svg_gradients.rb
Created February 7, 2014 14:40
Sass extension to create inline SVG gradients. Useful as a fallback for CSS gradients in IE.
require "base64"
require "rack"
module Sass::Script::Functions
def radial_gradient_image_data_url(color = Sass::Script::Color.new([0, 0, 0]), height = Sass::Script::Number.new(5))
assert_type height, :Number
svg_data_url(<<-SVG)
<svg xmlns="http://www.w3.org/2000/svg">
<defs>
<radialGradient id="gradient">