Skip to content

Instantly share code, notes, and snippets.

View saivarunk's full-sized avatar
💭
drowned into k8s

Varun Kruthiventi saivarunk

💭
drowned into k8s
View GitHub Profile
@saivarunk
saivarunk / Setup the variation at the top of your PHP page.
Created January 17, 2014 08:12
Setup the variation at the top of your PHP page.
<?php
$my_test = new phpab('my_test'); // set the name of the a/b test
$my_test->add_variation('my_variation', '<p>My alternative content</p>'); // add a variation
@saivarunk
saivarunk / gist:8470014
Created January 17, 2014 08:16
Wrap control content in {phpab} tags to run HTML variations. Whatever is inside {phpab} tags will be replaced with a variation or left alone if the user is in the control group.
{phpab my_test}<p>My control content</p>{/phpab my_test} <!-- Content wrapped in {phpab} tags -->
@saivarunk
saivarunk / gist:8470018
Created January 17, 2014 08:17
Add CSS variations. phpA/B will automatically add the name of the current variation as a class name to the <body> tag.
p
{
color: black; /* control styles */
}
.phpab-my_variation p
{
color: red; /* variation styles */
}
@saivarunk
saivarunk / designer.html
Created November 18, 2014 07:02
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
<?php
/*
Author: Sai Varun KN
This is a redis caching system for wordpress.
some caching mechanics are summarized below:
- cached pages do not expire not unless explicitly deleted or reset
//* Customize the return to top of page text
add_filter( 'genesis_footer_backtotop_text', 'sv_footer_backtotop_text' );
function sv_footer_backtotop_text($backtotop) {
$backtotop = '[footer_backtotop text="Return to Top"]';
return $backtotop;
}
//* Display author box on single posts
add_filter( 'get_the_author_genesis_author_box_single', '__return_true' );
//* Customize the author box title
add_filter( 'genesis_author_box_title', 'custom_author_box_title' );
function custom_author_box_title() {
return '<strong>About the Author</strong>';
}
//* Modify the size of the Gravatar in the author box
add_filter( 'genesis_author_box_gravatar_size', 'author_box_gravatar_size' );
function author_box_gravatar_size( $size ) {
return '80';
}