Skip to content

Instantly share code, notes, and snippets.

View netmagik's full-sized avatar

Irina Blumenfeld netmagik

View GitHub Profile
/* Align Simple Social Icons Centered */
.simple-social-icons ul.alignright,
.simple-social-icon ul.alignleft {
text-align: center;
}
.simple-social-icons ul.alignright li,
.simple-social-icons ul.alignleft li {
display: inline-block;
float: none;
@netmagik
netmagik / .gitignore
Last active August 29, 2015 14:12 — forked from marcjenkins/.gitignore
# Thanks to: https://gist.github.com/jdbartlett/444295
# Ignore everything in the root except the "wp-content" directory.
/*
!.gitignore
!wp-content/
# Ignore everything in the "wp-content" directory, except the "plugins" and "themes" directories.
wp-content/*
!wp-content/plugins/

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

#responsive-menu-icon::before {
color: #333;
content: "\f333";
font: normal 24px/1 'dashicons';
margin: 0 auto;
}
@netmagik
netmagik / images.php
Created November 4, 2015 16:07 — forked from phpbits/images.php
Automatically replace original uploaded image with large image size
<?php
/*
* Remove Original Uploaded images
* retain large size image
*/
add_filter('wp_generate_attachment_metadata','phpbits_replace_uploaded_image');
function phpbits_replace_uploaded_image($image_data) {
// if there is no large image : return
if (!isset($image_data['sizes']['large'])) return $image_data;
<IfModule deflate_module>
<IfModule filter_module>
AddOutputFilterByType DEFLATE text/plain text/html
AddOutputFilterByType DEFLATE text/xml application/xml application/xhtml+xml application/xml-dtd
AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml image/svg+xml
AddOutputFilterByType DEFLATE text/css text/javascript application/javascript application/x-javascript
AddOutputFilterByType DEFLATE font/otf font/opentype application/font-otf application/x-font-otf
AddOutputFilterByType DEFLATE font/ttf font/truetype application/font-ttf application/x-font-ttf
</IfModule>
</IfModule>
/* http://nicolasgallagher.com/another-css-image-replacement-technique/ */
.ir {
font: 0/0 a;
text-shadow: none;
color: transparent;
}
function _remove_script_version( $src ){
$parts = explode( '?ver', $src );
return $parts[0];
}
add_filter( 'script_loader_src', '_remove_script_version', 15, 1 );
add_filter( 'style_loader_src', '_remove_script_version', 15, 1 );
@netmagik
netmagik / Style previous-next post navigation
Last active April 18, 2016 16:54
How to style previous/next post navigation links
/* Previous and Next post links on single posts
------------------------------------------------------------ */
#prev-next {
float: left;
margin: 30px 0 40px;
width: 100%;
}
#prev-next .prev-link {