Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<head>
<!--Little CSS fade in -->
<style>
.fadeIn{
-webkit-animation: fade-in 2s ease;
-moz-animation: fade-in ease-in-out 2s both;
-ms-animation: fade-in ease-in-out 2s both;
-o-animation: fade-in ease-in-out 2s both;
@corradomatt
corradomatt / SassMeister-input.scss
Created June 11, 2015 15:40
Generated by SassMeister.com.
// ----
// libsass (v3.2.4)
// ----
.another-test {
background: red;
}
%placeholder {
display: block;
@corradomatt
corradomatt / SassMeister-input.scss
Created June 11, 2015 15:43
Generated by SassMeister.com.
// ----
// libsass (v3.2.4)
// ----
%placeholder {
display: block;
}
.another-test {
background: red;
// if an invalid form field has been made valid,
// remove the shouty error highlighting - if a valid
// required field has been made invalid, start shouting
$('input, textarea, select').on('change', function(){
var $input = $(this);
var isRequired = $input.parents('.gfield').is('.gfield_contains_required');
var isValid = $input.is(':valid');
if ( isRequired && isValid ) {
@corradomatt
corradomatt / MyPost.php
Last active September 20, 2016 21:45
Extending Timber\Post class issues... https://github.com/timber/timber/issues/1197
<?php
class MyPost extends Timber\Post
{
public function __construct()
{
parent::__construct();
}
}
@corradomatt
corradomatt / run-wp-cron.sh
Last active September 7, 2018 16:10 — forked from bjornjohansen/run-wp-cron.sh
Run cron on all sites on a server (works with multisite) - Thanks to https://gist.github.com/bjornjohansen/a00a9fee5475c4dadb56
#!/bin/bash
# Copyright © 2018 Matt Barrett - https://github.com/corradomatt
# Special thanks to https://gist.github.com/bjornjohansen/a00a9fee5475c4dadb56
# This work is free. You can redistribute it and/or modify it under the
# terms of the Do What The Fuck You Want To Public License, Version 2,
# as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.
HTML_ROOT="/var/www/html"
WP_CLI="/usr/local/bin/wp"
SITES=$(find $HTML_ROOT ! -path $HTML_ROOT -maxdepth 1 -type d -exec echo {} \;)