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
.modal { | |
width: 800px; | |
left: 40%; | |
} | |
.lightbox-content { | |
width: 100%; | |
} | |
.lightbox-image { |
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 express = require('express'), | |
app = express(); | |
app.listen(80); | |
app.get('/', function(req, res){ | |
var ua = req.header('user-agent'); | |
// Check the user-agent string to identyfy the device. | |
if(/mobile|iphone|ipod|android|blackberry|opera|mini|windows\sce|palm|smartphone|iemobile|ipad|android|android 3.0|xoom|sch-i800|playbook|tablet|kindle/i.test(ua)) { | |
res.sendfile(__dirname + '/mobile.html'); | |
} else { | |
res.sendfile(__dirname + '/index.html'); |
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
if [ ! -d "htdocs" ]; then | |
echo 'Installing WordPress (release version) in realestate/htdocs...' | |
mkdir ./htdocs | |
cd ./htdocs | |
wp core download --allow-root | |
wp core config --dbname="realestate" --dbuser=wp --dbpass=wp --dbhost="localhost" --allow-root | |
wp core install --url=realestate.dev --title="realestate - A WordPress Site" --admin_user=admin --admin_password=password --admin_email=demo@example.com --allow-root | |
cd - | |
else | |
echo 'Updating WordPress in realestate/htdocs...' |
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() { | |
var currentSize = "kitty"; // null var so its never the current size to start | |
$(window).resize(function() { | |
var size = window.getComputedStyle(document.body, ':after').getPropertyValue('content'); | |
var $menu = $('.nav-collapse'); | |
/* Ridiculous thing to deal with inconsistent returning of |
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 is_blog () { | |
global $post; | |
$posttype = get_post_type($post ); | |
return ( ((is_archive()) || (is_author()) || (is_category()) || (is_home()) || (is_single()) || (is_tag())) && ( $posttype == 'post') ) ? true : false ; | |
} |
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
%vertical-align { | |
position: relative; | |
top: 50%; | |
-webkit-transform: translateY(-50%); | |
-ms-transform: translateY(-50%); | |
transform: translateY(-50%); | |
} |
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
add_filter ('add_to_cart_redirect', 'redirect_to_checkout'); | |
function redirect_to_checkout() { | |
global $woocommerce; | |
$checkout_url = $woocommerce->cart->get_checkout_url(); | |
return $checkout_url; | |
} | |
add_filter('single_add_to_cart_text', 'woo_custom_cart_button_text'); |
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
on_sent_ok: "location = 'http://itunes.com/';" |
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
if (window.location.hash.split('-')[0] == '#item') { | |
$('ul.side').addClass('hashed'); | |
} | |
// the below is questionable | |
$(function () { | |
if (window.location.hash) { | |
getHash(); | |
} |