This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Bootstrap Mid-Small - col-ms-* - the missing grid set for Bootstrap3. | |
// | |
// This is a hack to fill the gap between 480 and 767 pixels - a missing range | |
// in the bootstrap responsive grid structure. Use these classes to style pages | |
// on cellphones when they transition from portrait to landscape. | |
// | |
// Contains: | |
// Columns, Offsets, Pushes, Pulls for the Mid-Small layout | |
// Visibility classes for the Mid-Small layout | |
// Redefined visibility classes for the Extra Small layout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Bootstrap 3 text field input | |
Form::macro('bootstrapText', function($name, $label=null, $value=null, $attr=array(), $help=null) | |
{ | |
$attr['id'] = isset($attr['id']) ? $attr['id'] : $name; | |
if ( !isset($attr['class']) ) | |
$attr['class'] = "form-control"; | |
else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Foundation 5 form label element wrapper | |
Form::macro('foundationLabelWrapper', function($name, $label = null, $element) | |
{ | |
$label = is_null($label) ? ucwords(str_replace(array('-', '_'), ' ', $name)) : $label; | |
$errors = View::shared('errors'); | |
$out = ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Block Grid | |
// Technique adapted from Foundation 5 for Bootstrap 3. | |
// https://github.com/zurb/foundation/blob/f755d8704123f86c281ede0b171881e2672f150d/scss/foundation/components/_block-grid.scss | |
// Original LESS Version by Christopher Mitchell (https://gist.github.com/ChrisTM) | |
// Converted to SCSS by Rasmus Jürs (https://github.com/Jursdotme) | |
// Usage: | |
// <ul class='block-grid-md-3 block-grid-lg-4'> | |
// <li class='block-grid-item'>...</li> | |
// <li class='block-grid-item'>...</li> | |
// </ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Usage: | |
// @include respond($screen-sm) { ... } | |
// or | |
// @include respond(480px) { ... } | |
@mixin respond($breakpoint) { | |
@media only screen and (min-width: $breakpoint) { @content; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you are using Windows as your Vagrant host OS, there is a limitation in Windows where any given folder path | |
# cannot be more than 260 characters long. This becomes a problem with Vagrant because, for example, if you | |
# install a Linux guest environment and try to create a deep directory structure in a synced folder, Linux will | |
# throw errors. This is because the synced folder is under the constraints of the Windows host. A common example | |
# of this happening is when installing node.js modules. NPM is known for creating some very long, deep | |
# folder paths because each node depenency has it's own dependencies, which have their own dependencies, etc... | |
# | |
# This gist solves the problem and works around the Windows 260 character path limit. Add it to your Vagrantfile. | |
# | |
# NOTE: This bug in Vagrant was fixed in 1.7.3, but reverted back in 1.7.4 due to some regression bugs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Download iTunes Festival streams | |
# | |
# 1. Open Wireshark, start a new Capture, filter by "http.cookie" | |
# | |
# 2. Open iTunes and play the Festival show you want | |
# | |
# 3. Look for "/auth/" items in your capture list. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# script to check for complete torrents in transmission folder, then stop and move them | |
# either hard-code the MOVEDIR variable here… | |
MOVEDIR=/home/mjdescy/media # the folder to move completed downloads to | |
# …or set MOVEDIR using the first command-line argument | |
# MOVEDIR=%1 | |
# use transmission-remote to get torrent list from transmission-remote list | |
# use sed to delete first / last line of output, and remove leading spaces | |
# use cut to get first field from each line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// leastSquaresFit | |
/// Calculate the least square fit linear regression of provided values | |
/// @param {map} $map - A SASS map of viewport width and size value combinations | |
/// @return Linear equation as a calc() function | |
/// @example | |
/// font-size: leastSquaresFit((576: 24, 768: 24, 992: 34)); | |
/// @author Jake Wilson <[email protected]> | |
@function leastSquaresFit($map) { | |
// Get the number of provided breakpoints |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// linear-interpolation | |
/// Calculate the definition of a line between two points | |
/// @param $map - A SASS map of viewport widths and size value pairs | |
/// @returns A linear equation as a calc() function | |
/// @example | |
/// font-size: linear-interpolation((320px: 18px, 768px: 26px)); | |
/// @author Jake Wilson <[email protected]> | |
@function linear-interpolation($map) { | |
$keys: map-keys($map); | |
@if (length($keys) != 2) { |
OlderNewer