Skip to content

Instantly share code, notes, and snippets.

View kevinruscoe's full-sized avatar
💻
Working

Kevin Ruscoe kevinruscoe

💻
Working
View GitHub Profile
@kevinruscoe
kevinruscoe / gist:10109022
Created April 8, 2014 10:49
Add GZIP Compression
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</IfModule>
@kevinruscoe
kevinruscoe / gist:11395094
Last active August 29, 2015 14:00
Breadcrumb functions for WordPress
<?php
function the_breadcrumb(){
echo get_breadcrumb();
}
function get_breadcrumb(){
global $post;
$posts = array();
@kevinruscoe
kevinruscoe / microdata-review.html
Last active August 29, 2015 14:00
microdata rating/review
<!-- The Review, this <div> is repeatable for more than 1 review -->
<div itemprop="review" itemscope itemtype="http://schema.org/Review">
<h1 itemprop="about">This thing is brilliant!</h1>
<p><span itemprop="author">Kevin Ruscoe</span>'s review of <span property="v:itemreviewed">this thing</span> - <span itemprop="datePublished" content="2014-05-02">May 2nd 2014</span>
<p itemprop="reviewBody">
This thing is question is awesome. It does so many things!
</p>
<div itemscope itemtype="http://schema.org/Dentist">
<h1 itemprop="name">Practice Name</h1>
<p itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
<span itemprop="streetAddress">Practice Address</span>
<span itemprop="addressLocality">Practice City</span>,
<span itemprop="addressRegion">Practice State/County</span>
<span itemprop="postalCode">Practice ZIP/Postcode</span>
</p>
<p>
Phone: <span itemprop="telephone">00000 000 000</span>
@kevinruscoe
kevinruscoe / seo-site-move
Created May 16, 2014 10:04
SEO site move.
1 - Head over to Google Webmasters and add the old site
2 - Submit a sitemap for the old site
3 - Create 301 redirects to new site from old site (make pages-to-redirects, i.e. domain1.com/news - domain2.com/our-news)
4 - Add new site to Webmasters
5 - Submit a sitemap for the new site
6 - Crawl/fetch as Google on new site
7 - Crawl/fetch as Google on old site
8 - In the old sites webmaster tools, click the cog icon, and click "change of address".
@kevinruscoe
kevinruscoe / wordpress-cheats.md
Last active August 29, 2015 14:01
WordPress Cheats

Blog Details

<p>
  <small>Posted by <strong><?php the_author() ?></strong> on <?php the_time('jS F Y') ?>, under <?php the_category(',') ?></small>
</p>

Only show 300 chars of blog

@kevinruscoe
kevinruscoe / gist:78fd1869b08b5d04d5a9
Created June 30, 2014 11:58
A simple trade system for UFPS
using UnityEngine;
using System.Collections;
public class SimpleTrade : MonoBehaviour {
public vp_Inventory inventory;
public vp_UnitType required_item;
public vp_ItemType given_item;
void OnTriggerEnter( Collider col ){
@kevinruscoe
kevinruscoe / ConditionedWeapon.cs
Last active August 29, 2015 14:03
Conditioned Weapon for UFPS
using UnityEngine;
using System.Collections;
public class ConditionedWeapon : MonoBehaviour {
private vp_FPPlayerEventHandler m_Player;
public float condition = 1f; // Item's condition ( 0% to 100% )
public float useDamage = .5f; // Each use removes x% off the condition
@kevinruscoe
kevinruscoe / bootstrap-template.html
Created November 5, 2014 15:05
BOOSTRAP TEMPLATES
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="Pop Creative">
<title>Template</title>
using UnityEngine;
using System.Collections;
public class Mario : MonoBehaviour {
public MarioState _state;
public tk2dSpriteAnimator animator;
public tk2dSprite sprite;