Skip to content

Instantly share code, notes, and snippets.

View mkormendy's full-sized avatar
🛠️
Building, fixing, making a living

Mike Kormendy mkormendy

🛠️
Building, fixing, making a living
View GitHub Profile
<select id="edit-menu-item-if-menu-subsite-6185" multiple="yes" name="menu_item_6185_if_menu_subsite[]" class="widefat" size="6" style="margin-top:5px">
<option value="1">ALL</option>
<option value="2">Texas</option>
<option value="8">Arizona</option>
<option value="9">New Mexico</option>
<option value="10">Colorado</option>
<option value="11">Washington</option>
<option value="12">Georgia</option>
<option value="13">Kansas</option>
<option value="15">Florida</option>
@mkormendy
mkormendy / _contrast_mixin.scss
Created June 22, 2016 17:58 — forked from aaronrussell/_contrast_mixin.scss
Sass function and mixin for setting contrasting background and foreground colors
$contrasted-default-dark: #000;
$contrasted-default-light: #fff;
@mixin contrasted($bg, $dark:$contrasted-default-dark, $light:$contrasted-default-light){
background-color: $bg;
color: get_contrast_yiq($bg, $dark, $light);
}
@mkormendy
mkormendy / Default (OSX).sublime-keymap
Last active June 19, 2016 00:39
Sublime Text Plugin with preferences and bindings to toggle auto zoom (resize focused window) feature in the Sublime Text Origami panel management Package.
[
{
"keys": ["super+alt+`"], "command": "toggle_origami_auto_zoom",
}
]
@mkormendy
mkormendy / fix-wordpress-media-library-svgs.php
Last active June 13, 2016 21:09
Pushing code manually with javascript into the wp media template...
add_action('print_media_templates', function() {
?>
<script>
var el = document.getElementById('tmpl-attachment');
var pos = el.outerHTML.indexOf('<# } else if ( \'image\' === data.type && data.sizes ) { #>');
var text = '<# } else if ( \'svg+xml\' === data.subtype ) { #>\n' +
'<div class="centered">\n' +
'<img src="{{ data.url }}" class="thumbnail" draggable="false" />\n' +
'</div>\n' +
find ./ -type f | grep .DS_Store | xargs rm
@mkormendy
mkormendy / upgrade-centos7-php-to-56.sh
Last active April 6, 2016 15:53
Upgrade PHP to 5.6 on CentOS with gd, mcrypt, mysql, pdo, apcu, opcache, bz2, zlib, ftp, pecl-geoip, imagemagick
cat /etc/centos-release # nice to know what CentOS we're running
yum update # update yum (don't upgrade as it will remove essential stuff for our specific server)
yum remove php-common # remove php-common
yum clean all # clean up yum
yum install wget # if wget isn't on the system, install it
@mkormendy
mkormendy / Mixin for Media Queries.markdown
Created February 11, 2016 20:47
Mixin for Media Queries
@mkormendy
mkormendy / SASS Triangle Mixin.markdown
Created February 11, 2016 20:46
SASS Triangle Mixin
@mkormendy
mkormendy / RGBA Mixin Using SASS.markdown
Created February 11, 2016 20:45
RGBA Mixin Using SASS