Skip to content

Instantly share code, notes, and snippets.

View ataylorme's full-sized avatar

Andrew Taylor ataylorme

View GitHub Profile
<?php
if (isset($_POST['environment'])){
$req = pantheon_curl('https://api.live.getpantheon.com/sites/self/settings', NULL, 8443);
$meta = json_decode($req['body'], true);
if($meta['allow_cacheserver'] != 1){
$req = pantheon_curl('https://api.live.getpantheon.com/sites/self/settings', '{"allow_cacheserver":true}', 8443, 'PUT');
}
}
@ataylorme
ataylorme / composer.json
Last active August 5, 2016 13:26
Composer file for WordPress
{
"name" : "WordPress-Composer",
"description" : "Example managing WordPress with Composer",
"version" : "0.1.0",
"type" : "project",
"keywords" : [],
"minimum-stability" : "dev",
"repositories" : [
{
"type" : "composer",
@ataylorme
ataylorme / SassMeister-input.scss
Created January 14, 2015 22:15
Generated by SassMeister.com.
// ----
// libsass (v3.1.0-beta)
// ----
//BREAKPOINTS
$Mobile: 480px;
$Landscape: 801px;
$Desktop: 1400px;
//MEDIA QUERY MIXIN
add_theme_support( 'typecase', array(
// array of simple options
'simple' => array(
// each array is an option
// these options are displayed in the main theme fonts panel section
array(
// the label displayed in customizer
'label' => 'Body Copy',
// the CSS selector to apply the font to
'selector' => 'body',
@ataylorme
ataylorme / SassMeister-input.scss
Created November 25, 2014 21:00
Generated by SassMeister.com.
// ----
// libsass (v3.0.1)
// ----
h1{
font-size: 48px;
@media only screen and (max-width: 768px){
font-size: 32px;
}
@media only screen and (max-width: 480px){
@ataylorme
ataylorme / WordPress gulpfile.js
Created September 4, 2014 15:52
WordPress gulpfile.js
// Load plugins
var gulp = require('gulp'),
sass = require('gulp-sass'),
minifyCss = require("gulp-minify-css"),
autoprefixer = require("gulp-autoprefixer"),
imagemin = require('gulp-imagemin'),
notify = require("gulp-notify"),
rename = require("gulp-rename"),
cmq = require('gulp-combine-media-queries'),
uglify = require('gulp-uglify'),
/* SASS */
$tablet_zoom: (768px / $Desktop) * 100%;
@media (min-width: $Mobile + 1px) and (max-width: $Desktop - 1px) { html { zoom: $tablet_zoom; } }
/* jQuery */
/* TABLET ZOOM FIX */
if ( size.indexOf("portrait") !==-1 || size.indexOf("landscape") !==-1 ){
var html_zoom = ( ( ( $(window).width() - 10 ) / 970 ) * 100 ) + '%';
console.log(html_zoom);
$('html').css('zoom', html_zoom);
//BREAKPOINTS
$Mobile: 400px;
$Landscape: 800px;
$Desktop: 1025px;
//MEDIA QUERY MIXIN
@mixin respond($media) {
@if $media == mobile {
@media only screen and (max-width: $Mobile) { @content; }
}//mobile
@else if $media == portrait {
<?php
if($_POST['HandshakeKey'] == 'YOUR HANDSHAKE KEY GOES HERE') {
function post_lead() {
$wufoo_data = array ();
//first name
if(!empty($_POST['Field123'])){
$wufoo_data['first_name'] = $_POST['Field123'];
remove_action( 'wp_head', 'feed_links', 2 );