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 / 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 / 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>

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 / 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>