Skip to content

Instantly share code, notes, and snippets.

View richardegil's full-sized avatar

Richard Gil richardegil

View GitHub Profile
Atom settings
@richardegil
richardegil / gulpfile.js
Created January 22, 2014 20:02
First Gulpfile
var gulp = require("gulp");
var minifycss = require('gulp-minify-css');
var autoprefixer = require('gulp-autoprefixer');
var notify = require('gulp-notify');
var sass = require('gulp-ruby-sass');
var imagemin = require('gulp-imagemin');
var cache = require('gulp-cache');
gulp.task('css', function() {
return gulp.src('sass/style.scss')
<?php
include (get_template_directory() . '/library/includes/universal/utms-superinclude-topnav.php');
?>
BASE:
<?php
include (get_template_directory() . '/includes/universal/utms-superinclude-topnav.php');
?>
// Ben Folds Five Poster - Cityscape Generator by Brendan Dawes
// http://brendandawes.com/projects/benfoldsfive/
// Requires library from http://toxiclibs.org
import toxi.color.*;
import toxi.util.datatypes.*;
import processing.pdf.*;
final color BACKGROUND_COLOR = color(240);
// search text
$key = wp_specialchars($s, 1);
if ( have_posts() ) :
<p>The following pages contain your search term, <strong>"<?php echo $key;?>"</strong>.</p>
// date comparison
// if date value is greater than yesterday's value
if( strtotime($date) > time()-86400 ){
//do stuff
}
@richardegil
richardegil / gist:4687274
Created January 31, 2013 22:33
for chad
/* Display Background URLs */
function sidebar_feature( $post ) {
// Use nonce for verification
wp_nonce_field( plugin_basename( __FILE__ ), 'myplugin_noncename' );
$sidebar_feature = get_post_meta($post->ID, 'sidebar_feature', true);
?>
@richardegil
richardegil / gist:4686301
Created January 31, 2013 20:49
htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
//sets definittions for base folder
define( 'TEMPLATE_URI', get_template_directory() );
define( 'TEMPLATE_INCLUDES', get_template_directory(). '/includes' );
//sets definititions for current theme folder
define( 'HOME_URI', home_url() );
define( 'THEME_URI', get_stylesheet_directory() );
define( 'THEME_INCLUDE', THEME_URI . '/includes' );
define( 'THEME_IMAGES', THEME_URI . '/images' );
define( 'THEME_CSS', THEME_URI . '/css' );