This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Person | |
#have a first_name and last_name attribute with public accessors | |
#attr_accessor | |
public | |
attr_accessor :first_name, :last_name | |
#have a class attribute called `people` that holds an array of objects | |
@@people = [] | |
#have an `initialize` method to initialize each instance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(window).bind("load", function() { | |
// Vimeo and YouTube Embed Resizing | |
// Find all YouTube videos | |
var $allVideos = $("iframe[src*='//player.vimeo.com'], iframe[src*='//www.youtube.com']"), | |
// The element that is fluid width | |
$fluidEl = $(".content-body"); | |
// Figure out and save aspect ratio for each video | |
$allVideos.each(function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var lastScrollTop; | |
//console.log(lastScrollTop); | |
$(window).scroll(function(event){ | |
$('.top-filter').stop(); | |
var currentScrollTop = $(window).scrollTop(); | |
if (currentScrollTop > lastScrollTop){ | |
$('.top-filter').animate({ | |
top: "-20px", | |
}, 1000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function findStores() { | |
//creating array of data to be posted | |
$post_data['item'] = $_POST['locateitem']; | |
$post_data['radius'] = $_POST['locateradius']; | |
$post_data['ip'] = $ip; | |
//traverse array and prepare data for posting | |
foreach ( $post_data as $key => $value) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<?php | |
/*if ($_SERVER['REQUEST_METHOD'] == 'POST') { | |
if(!empty($_POST['locatezip'])){ | |
$_POST['zip'] = $_POST['locatezip']; | |
$_POST['radius'] = $_POST['locateradius']; | |
$_POST['item'] = $_POST['locateitem']; | |
} | |
}*/ | |
if (!empty($_SERVER['HTTP_CLIENT_IP'])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* WooCommerce Tax Settings | |
* | |
* @author WooThemes | |
* @category Admin | |
* @package WooCommerce/Admin | |
* @version 2.1.0 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
# Ugh wordpress - wordpress apparently doesn't like it if you refer to the | |
# site interchangably between www.domain.com and domain.com, so rewrite | |
# the non-www version to the www version here to avoid problems. If we don't | |
# do this, going to domain.com/anything-at-all will redirect to the root of | |
# www.domain.com, which is not helpful. | |
# NOTE: This is a 302 redirect, not a 301, as at some point we might want to | |
# make the non-www site the "canonical" one | |
# FIX - redirets realmswork.com as well |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function post_save($entry, $form) { | |
$post_url = "http://www.lasikplus.com/ischedule/action/contactRequest.lp"; | |
function format_phone($phone) { | |
var_dump($phone); | |
$phone = preg_replace("/[^0-9]/", "", $phone); | |
$phone = preg_replace("/([0-9]{3})([0-9]{3})([0-9]{4})/", "$1 $2 $3", $phone); | |
var_dump($phone); | |
return explode(' ', $phone); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$phone = $entry["5"]; | |
function format_phone($phone) { | |
$phone = preg_replace("/[^0-9]/", "", $phone); | |
if (strlen($phone) == 7) { | |
return preg_replace("/([0-9]{3})([0-9]{4})/", "$2 $3", $phone); | |
} elseif (strlen($phone) == 10) { | |
return preg_replace("/([0-9]{3})([0-9]{3})([0-9]{4})/", "$1 $2 $3", $phone); |
NewerOlder