Skip to content

Instantly share code, notes, and snippets.

View taupecat's full-sized avatar

Tracy Rotton taupecat

View GitHub Profile
<?php
add_action( 'wp_enqueue_scripts', 'jt_enqueue_scripts' );
function jt_enqueue_scripts() {
wp_enqueue_script( 'wp-api' );
wp_enqueue_script( 'wp-util' );
}
add_action( 'wp_footer', 'jt_print_post_template', 25 );
@joshbroton
joshbroton / Animate and Keyframe Sass Mixins
Created August 10, 2013 07:01
Sass mixins for cross-browser CSS animate and keyframe. @include animate() accepts multiple animations in a comma-separated list.
// animate with prefixes
// @include animation(ANIMATIONNAME LENGTH REPEAT INOUT,ANIMATIONNAME LENGTH REPEAT INOUT,ANIMATIONNAME LENGTH REPEAT INOUT);
@mixin animation($animate...) {
$max: length($animate);
$animations: '';
@for $i from 1 through $max {
$animations: #{$animations + nth($animate, $i)};
@if $i < $max {
@kingkool68
kingkool68 / Seamless Git Deployment
Last active December 17, 2015 05:09
To push code changes to text servers I do this.
We have a private Git running on a server somewhere which we consider our central repository. Inside the .git/hooks/post-recieve is the following:
#!/bin/bash
while read oldrev newrev ref
do
branch=`echo $ref | cut -d/ -f3`
if [ "master" == "$branch" ]; then
@markjaquith
markjaquith / plugin-deploy.sh
Created November 16, 2012 05:04 — forked from scribu/plugin-deploy.sh
Plugin deploy script
#!/bin/bash
# args
MSG=${1-'deploy from git'}
BRANCH=${2-'trunk'}
# paths
SRC_DIR=$(git rev-parse --show-toplevel)
DIR_NAME=$(basename $SRC_DIR)
DEST_DIR=~/svn/wp-plugins/$DIR_NAME/$BRANCH