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
@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
<div id="instagram" class="widget">
<?php
// Set variables
$image_number = 2;
$image_size = 'low_resolution'; //options: low_resolution (306), thumbnail (150), standard_resolution (612)
// Create the API URL for the user data
$user_access_token = '123456.xxxxxxxx.zzzzzzzzzzzzzzzzzzzzzzz';
$user_data_url = 'https://api.instagram.com/v1/users/self/?access_token=' . $user_access_token;
@zoerooney
zoerooney / page-directory.liquid
Last active August 29, 2015 14:15
Directory using Shopify blog content, sorted by title, with in-page quick search. As seen on: http://afavoritedesign.com/pages/the-peddlers with a full tutorial here: http://zoerooney.com/blog/tutorials/shopify-alphabetical-searchable-directory-page/
<header class="page-title">
<h1>{{ page.title }}</h1>
</header>
<section id="content">
<div class="search-area">
<div class="left">{{ page.content }}</div>
<div class="right"><form><i class="icon-search"></i><input type="text" id="peddler-search" placeholder="type your city, state or postal code"></form></div>
</div>
<div class="locations">
{% assign sorted_articles = blogs.peddlers.articles | sort: 'title' %}
@zoerooney
zoerooney / dabblet.css
Created March 17, 2013 16:47
Flamingo Sample
/**
* Flamingo Sample
*/
body {
font-family: sans-serif;
font-size: 14px;
padding: 50px
}