Skip to content

Instantly share code, notes, and snippets.

View zoerooney's full-sized avatar

Zoe Rooney zoerooney

View GitHub Profile
@zoerooney
zoerooney / gulpfile.js
Last active August 29, 2015 13:56
current Gulp configuration
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
minifycss = require('gulp-minify-css'),
livereload = require('gulp-livereload');
gulp.task('styles', function(){
return sass('scss/')
.on('error', function (err) {
console.error('Error!', err.message);
<header class="entry-header">
<h1 class="entry-title"><?php the_title(); ?></h1>
<?php if ( bbp_is_single_forum() ) :
bbp_forum_content();
endif; ?>
</header><!-- .entry-header -->
@zoerooney
zoerooney / Gruntfile.js
Created March 12, 2014 16:25
Grunt files for posterity (we've switched to Gulp)
'use strict';
module.exports = function(grunt) {
// load all grunt tasks that start with 'grunt-'
require('load-grunt-tasks')(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
compass: {
body {
font-size: 14px;
padding: 50px
}
/*
div {
background: lemonchiffon;
margin: 0 auto;
width: 400px;
padding:20px
data-platform="<?php echo implode(', ', get_field('platform')); ?>"
data-project-type="<?php echo implode(', ', get_field('project_type')); ?>"
data-designer="<?php the_field('designers'); ?>"
@zoerooney
zoerooney / full-snippet.php
Last active August 29, 2015 14:01
Display posts by views using Jetpack plugin data, tutorial here: http://zoerooney.com/blog/tutorials/top-posts-by-page-views/ (publish date: 5/16)
<?php if( function_exists( 'stats_get_csv' ) ) :
$top_posts = stats_get_csv( 'postviews', array( 'days' => 21, 'limit' => -1 ) );
$top_ids = array();
foreach ( $top_posts as $top_post ) {
$top_ids[] = $top_post['post_id'];
}
// Check for transient, hat tip Greg Rickaby
if ( false === ( $tops = get_transient( 'popular_posts' ) ) ) :
@zoerooney
zoerooney / index.html
Last active August 29, 2015 14:01
GDI Class Samples
<!DOCTYPE HTML>
<html>
<head>
<title>OCCASIONETTE</title>
<link rel="stylesheet" type="text/css" href="reset.css">
<link rel="stylesheet" type="text/css" href="style.css">
<link href='https://fonts.googleapis.com/css?family=Pompiere|Sacramento' rel='stylesheet' type='text/css'>
</head>
<body>
<?php
/**
* The template for displaying all pages.
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site will use a
* different template.
*
* @package WordPress
@zoerooney
zoerooney / header-for-most-emails.html
Last active August 1, 2018 13:49
Shopify notification emails, bettered. I usually use the first one as the header for all the emails other than the ones with specific template code below. Be sure to put the correct logo dimensions in place in each snippet before using it!
<div style="width: 100%; margin: 0 auto; text-align: center; background: #ffffff;">
<a href="{{ shop.url }}"><img src="{{ 'logo.png' | asset_url }}" alt="{{ shop_name }}" width="WIDTH" height="HEIGHT" style="margin: 0 auto;" /></a>
<br/><br/>
</div>
@zoerooney
zoerooney / markup.html
Created August 8, 2014 18:41
Instafeed with links opening in new window
<div id="instafeed"></div>
<script>
var feed = new Instafeed({
clientId: 'XXXXXXXXXXXXXXXXXX',
accessToken: 'abcdefghijklmnop',
get: 'user',
userId: 12345678,
limit: 5,
after: function() {
external();