Skip to content

Instantly share code, notes, and snippets.

View netmagik's full-sized avatar

Irina Blumenfeld netmagik

View GitHub Profile
@netmagik
netmagik / mongodb_cheat_sheet_2022.md
Created September 11, 2022 18:26 — forked from codeSTACKr/mongodb_cheat_sheet_2022.md
MongoDB Cheat Sheet 2022
@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;

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

@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/
/* 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;
/* http://nicolasgallagher.com/another-css-image-replacement-technique/ */
.ir {
font: 0/0 a;
text-shadow: none;
color: transparent;
}