Skip to content

Instantly share code, notes, and snippets.

View lrobeson's full-sized avatar

Laura Robeson lrobeson

View GitHub Profile
@slucero
slucero / issue_numbers.rb
Created November 5, 2015 20:10
A Git hook for prepending commit messages with an issue number found in the current working branch. It's organized for use with the https://github.com/icefox/git-hooks project for managing git hooks.
#! /usr/bin/env ruby
# ~/.git_hooks/lib/issue_numbers.rb
$issue_pattern = /\d{5}(?=-)/
#require 'git'
#g = Git.open(working_dir, :log => Logger.new(STDOUT))
@averyvery
averyvery / spread.sass
Last active May 16, 2020 22:07
spread.sass
// strip-units required by spread mixin
// http://stackoverflow.com/questions/12328259/how-do-you-strip-the-unit-from-any-number-in-sass
@function strip-units($number)
@return $number / ($number * 0 + 1)
// pow and sqrt required by ease function
// adapted from https://github.com/at-import/Sassy-math/blob/master/sass/math.scss
@function pow($base, $exponent)
$value: $base

Retina Macbook Pro

Fresh Mavericks OS X Install

Run Software Update…

- OS X Update 10.9.1, iBooks, iTunes, etc.
- Install / Update Apple Programs (Optional)
	- iWork (Pages, Numbers, Keynote)
	- iLife (iMovie, iPhoto, Garageband)
@flashvnn
flashvnn / template.php
Created May 7, 2014 04:34
Remove query strings from static resources drupal
<?php
/**
* Implements template_process_html().
*/
// Remove Query Strings from CSS filenames (CacheBuster)
function MYTHEME_process_html(&$variables) {
$variables['styles'] = preg_replace('/\.css\?.*"/','.css"', $variables['styles']);
}
@adamnorwood
adamnorwood / Gruntfile.js
Last active October 3, 2018 16:01
Gruntfile for Pattern Lab + Compass + Live Reload via grunt-browser-sync
/*
Gruntfile for Pattern Lab + Compass + Live Reload via grunt-browser-sync
Set up to use browser-sync because for the life of me I can't get
the grunt-contrib-watch livereload to *inject* the compiled CSS changes
to the browser (as opposed to livereload doing a full page refresh)...
(To be clear, the CSS injection I'm talking about is where changes to
the CSS file are slipped in to the browser very quickly with no
full page reload, and without losing your place if you've scrolled
@bytehead
bytehead / last_child.js
Last active December 18, 2015 07:48
last-child selector in ie8
// there is a solution for jQuery < 1.9.0, where you can use `$.browser`:
// https://gist.github.com/nathansmith/950767
// but jQuery removed `$.browser` in version 1.9.0, so you have to get another way:
function last_child() {
if (/msie [1-8]{1}[^0-9]/.test(navigator.userAgent.toLowerCase())) {
$('*:last-child').addClass('last-child');
}
}
$.fn.setAllToMaxHeight = function(){
return this.height( Math.max.apply(this, $.map( this , function(e){ return $(e).height() }) ) );
}
// usage: $(‘div.unevenheights’).setAllToMaxHeight();
@zachharkey
zachharkey / CSSToggle.py
Created February 12, 2012 03:05
SublimeText2 Module Toggle CSS format between single and multiline
import sublime, sublime_plugin, re
DEBUG_ENABLED = False
PRINT_CONTEXT = False
# Toggle between single-line or multi-line formatted css statement
#
# Add the following line to Preferences > Key Bindings - User
# { "keys": ["ctrl+shift+j"], "command": "toggle_single_line_css" }
#