Skip to content

Instantly share code, notes, and snippets.

Avatar

Matthew Lein matthewlein

View GitHub Profile
@matthewlein
matthewlein / IEVMs command
Last active Aug 29, 2015
IEVMs command line for me. NOTE the path /volumes/etc space is not escaped! This will install to a specific path and a specific version.
View IEVMs command
curl -s https://raw.githubusercontent.com/xdissent/ievms/master/ievms.sh | env INSTALL_PATH="/Volumes/El Resto/.ievms" env IEVMS_VERSIONS="8" bash
@matthewlein
matthewlein / SassMeister-input.scss
Created Nov 5, 2014
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// Sass (v3.4.6)
// Compass (v1.0.1)
// ----
/*
* Yellowgrid
* author : Matthew Lein
* url : https://github.com/matthewlein/yellowgrid
*
@matthewlein
matthewlein / SassMeister-input.scss
Created Nov 13, 2014
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// libsass (v3.0.1)
// ----
/*
* Yellowgrid
* author : Matthew Lein
* url : https://github.com/matthewlein/yellowgrid
*
* Inspired heavily by:
@matthewlein
matthewlein / jQuery.animationDuration.js
Last active Aug 29, 2015
jQuery.animationDuration.js
View jQuery.animationDuration.js
// ************************************************************************* //
//
// Get the length of a CSS transition or animation
//
// ************************************************************************* //
(function($){
$.fn.transitionDuration = function() {
// check the main transition duration property
@matthewlein
matthewlein / Readme.md
Last active Dec 30, 2015
Using ems is great for relational sizing, but with one big caveat, if your base font size changes, all your ems are off. DEVASTATING! Use this node script to change all ems in a folder to a new ratio based on your old and new base sizes. If you're editing lots and lots of files this can save you some time.
View Readme.md

Using ems is great for relational sizing, but with one big caveat, if your base font size changes, all your ems are off. DEVASTATING! Use this node script to change all ems in a folder to a new ratio based on your old and new base sizes.

For example:

body {
    font-size: 14px;
}
p {
@matthewlein
matthewlein / .jshintrc
Created Apr 30, 2012
JShint git pre-commit hook
View .jshintrc
{
"devel": false,
"undef": true
}
@matthewlein
matthewlein / Gruntfile.js
Last active Apr 8, 2020
The simplest way to have grunt run a server, watch all the files for changes, and livereload on change. Set up to compile SASS and livereload the css on changes.Using the package.json, all you need to do is npm install and then it should work.
View Gruntfile.js
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-sass');
// don't watch node_modules
// used in watch files below
var excludes = [
'!**/node_modules/**'