Skip to content

Instantly share code, notes, and snippets.

View epicmonkeez's full-sized avatar

Epic Monkeez epicmonkeez

  • Epic Monkeez
  • The Netherlands
View GitHub Profile
@epicmonkeez
epicmonkeez / SassMeister-input-HTML.html
Created May 26, 2014 07:46
Generated by SassMeister.com.
<html>
<head>
<title>DRY CSS through cached/temp placeholders</title>
</head>
<body>
<article>
<h1 class="txt-lead">This title should be black</h1>
<div class="error">Oops, this is an error!<br>With a red background.</div>
<div>
<button>Some ugly button</button>

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@epicmonkeez
epicmonkeez / gist:9135113
Created February 21, 2014 14:21
Starter HTML template + excessive meta tags
<!DOCTYPE html>
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7 oldie" lang="en"><![endif]-->
<!--[if IE 7]><html class="no-js lt-ie9 lt-ie8 oldie" lang="en"><![endif]-->
<!--[if IE 8]><html class="no-js lt-ie9 oldie" lang="en"><![endif]-->
<!--[if gt IE 8]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=EDGE; chrome=1"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title> ... </title>
@epicmonkeez
epicmonkeez / functions.php
Created August 31, 2013 11:54
Spam comments based on a word list
<?php
function in_comment_post_like($string, $array) {
foreach($array as $ref) { if(strstr($string, $ref)) { return true; } }
return false;
}
function drop_bad_comments() {
if (!empty($_POST['comment'])) {
$post_comment_content = $_POST['comment'];
$lower_case_comment = strtolower($_POST['comment']);
$bad_comment_content = array(
@epicmonkeez
epicmonkeez / functions.php
Created August 31, 2013 11:48
Unlink urls in comment text
<?php
remove_filter('comment_text', 'make_clickable', 9);
?>
@epicmonkeez
epicmonkeez / functions.php
Created August 31, 2013 11:47
Remove url field from the comment form and automatically spam comments with urls
<?php
function em_remove_comment_fields($fields) {
unset($fields['url']);
return $fields;
}
add_filter('comment_form_default_fields','em_remove_comment_fields');
function em_url_spamcheck( $approved , $commentdata ) {
return ( strlen( $commentdata['comment_author_url'] ) > 1 ) ? 'spam' : $approved;
}
@epicmonkeez
epicmonkeez / functions.php
Created August 31, 2013 11:45
Remove the url field from your comment form
<?php
function em_remove_comment_fields($fields) {
unset($fields['url']);
return $fields;
}
add_filter('comment_form_default_fields','em_remove_comment_fields');
?>
@epicmonkeez
epicmonkeez / functions.php
Created August 31, 2013 11:43
Automatically mark as spam comments with a super long url.
<?php
function em_url_spamcheck( $approved , $commentdata ) {
return ( strlen( $commentdata['comment_author_url'] ) > 50 ) ? 'spam' : $approved;
}
add_filter( 'pre_comment_approved', 'em_url_spamcheck', 99, 2 );
?>
@epicmonkeez
epicmonkeez / Sample output
Last active December 20, 2015 09:09
This little WordPress Gist shows the thumbnail of a post and a link called 'slides' to startup a Lightbox/Slideshow with all the images stored in the post custom field called 'portfolio_slideshow'. - Use within the WordPress Loop. - Used Magicfields plugin to add a field for posts called 'portfolio_slideshow' which can be duplicated. - Use with …
<div class="thumb design development ">
<div class="thumb-img">
<a class="th" href="#" title="Image for the lightbox" rel="bookmark">
<img src="/wp-content/uploads/2013/07/post-thumbnail-image.jpg" class="attachment-wide-thumb wp-post-image" alt="" />
</a>
<div class="caption">
<div>
<span>Image caption</span>
</div>
<div>
@epicmonkeez
epicmonkeez / index.html
Created September 20, 2012 14:19
Messing around with 3d transforms and delayed transitions. Colours from http://colour.charlottedann.com/ and icons from http://symbolset.com/
<section class="ss-icon">
<a href="#"><article><span>facebook</span></article></a>
<a href="#"><article><span>twitter</span></article></a>
<a href="#"><article><span>tumblr</span></article></a>
<a href="#"><article><span>pinterest</span></article></a>
<a href="#"><article><span>behance</span></article></a>
<a href="#"><article><span>github</span></article></a>
<a href="#"><article><span>linkedin</span></article></a>
<a href="#"><article><span>dribbble</span></article></a>
<a href="#"><article><span>instagram</span></article></a>