Skip to content

Instantly share code, notes, and snippets.

@heyMP
heyMP / child_margin_fixer.scss
Created February 10, 2014 21:39
Child Margin Fixer. This will remove the margin on the first child and last child elements within a selector. Mainly used for lists.
@mixin child-margin-fixer {
& > *:first-child,
& > *:last-child,
& > *:last-child > *:last-child,
& > *:last-child > *:last-child > *:last-child {
margin: 0;
}
}
@heyMP
heyMP / gist:9118916
Created February 20, 2014 17:24
Mysql alias for MAMP
#MAMP
alias mysql="/Applications/MAMP/library/bin/mysql"
alias mysqldump="/Applications/MAMP/library/bin/mysqldump"
@heyMP
heyMP / _mixins.scss
Created March 14, 2014 11:09
Child Margin Fixer
@mixin child-margin-fixer($selector:'*') {
& > #{$selector}:first-child,
& > #{$selector}:last-child,
& > #{$selector}:last-child > #{$selector}:last-child,
& > #{$selector}:last-child > #{$selector}:last-child > #{$selector}:last-child {
margin: 0;
}
}
@heyMP
heyMP / _equal-height-boxes.scss
Created March 14, 2014 11:40
Equal height boxes with
.view-section-teasers {
@include view-section-teaser-colors($it-connects-color--blue, $it-connects-color--box-blue);
clear:both;
display: block;
overflow: hidden;
margin-top: 2em;
@include breakpoint($break-section-teasers--columns--right) {
padding-left: 10em;
@include main-content-padding(margin,negative, 2em);
}
buildir=`date +%m-%d-%Y-%I-%M`
echo $buildir
git clone git@bitbucket.org:phase2tech/psu.edu.git psu_profile
cd psu_profile
git checkout $1
cd ..
bash psu_profile/build.sh $buildir
cd $buildir
cp ../html/.htaccess ./
cd ..
@heyMP
heyMP / SassMeister-input.scss
Created April 2, 2014 16:21
Generated by SassMeister.com.
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// ----
@function splitString($string, $var, $location: 'first')
{
$length : str-length($string);
$index : str-index($string,$var);
$first : str-slice($string,0,$index - 1);
@heyMP
heyMP / gist:10218319
Created April 9, 2014 01:51
Upload photo to Drupal Services
// PHOTOS Upload
var imagesrc;
function takePhoto() {
navigator.camera.getPicture(onSuccess, onFail, { quality: 30, destinationType: Camera.DestinationType.DATA_URL, correctOrientation:true });
}
function onSuccess(imageData) {
var image = document.getElementById('photo-deposit');
imagesrc = imageData;
@heyMP
heyMP / input.css
Created April 25, 2014 01:14
Eliminate the 1px line at the bottom of some text input areas.
input[type="text"] {
-webkit-background-clip: border-box;
}
@heyMP
heyMP / gist:f5c1230dc7e37225a578
Last active August 29, 2015 14:00
Sublime Text 2 preferences file.
{
"binary_file_patterns":
[
"*.jpg",
"*.jpeg",
"*.png",
"*.gif",
"*.ttf",
"*.tga",
"*.dds",
@heyMP
heyMP / SassMeister-input.scss
Created June 18, 2014 01:16
Generated by SassMeister.com.
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// ----
@function splitString($string, $var, $location: 'first')
{
$length : str-length($string);
$index : str-index($string,$var);
$first : str-slice($string,0,$index - 1);