This file contains hidden or 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 Mixin for those who don't have it | |
@mixin vertical-align { | |
position: absolute; //relative | |
top: 50%; | |
-webkit-transform: translateY(-50%); | |
-moz-transform: translateY(-50%); | |
-o-transform: translateY(-50%); | |
-ms-transform: translateY(-50%); | |
transform: translateY(-50%); |
This file contains hidden or 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
@media only screen and (max-width: 760px) { | |
.woocommerce-cart #content .woocommerce table.shop_table td, | |
.woocommerce-cart #content .woocommerce-page table.shop_table td, | |
.woocommerce-checkout #content .woocommerce table.shop_table td, | |
.woocommerce-checkout #content .woocommerce-page table.shop_table td { | |
padding: 3px 0; | |
border-top: 0; | |
} |
This file contains hidden or 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
######################################################### | |
#----------------- P A G E S P E E D -------------------# | |
######################################################### | |
# Our server has PageSpeed installed on it. Which makes our life optimised. Seriously optimised too. | |
# I've got a bunch of things you can add to your site below. Comment out what you don't want. | |
# I've tested out a bunch of this stuff, if anything doesn't work, flag it up and let me know asap. | |
# Turn on PageSpeed + It's Candy |
This file contains hidden or 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
SetEnvIfNoCase Referer semalt.com spammer=yes | |
Order allow,deny | |
Allow from all | |
Deny from env=spammer |
This file contains hidden or 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 | |
// Using a custom field called wpcf-home-heading created by types. | |
// The entered value of this is: Plastic Cards to get you noticed | |
<?php | |
$field = types_render_field("home-heading", array()); | |
if ( function_exists( 'barley_wrapper' )) { | |
echo barley_wrapper('wp_custom_field' , $field, ($field)); | |
This file contains hidden or 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 barley_field($field_name){ | |
$key_values = get_post_custom_values( $field_name ); | |
foreach ( $key_values as $key => $value ) { | |
if ( function_exists( 'barley_wrapper' )) { | |
echo barley_wrapper('wp_custom_field', $value , $field_name); | |
} else { | |
echo $value; | |
} | |
} | |
} |
This file contains hidden or 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
import RPi.GPIO as GPIO | |
import time | |
GPIO.setmode(GPIO.BCM) | |
PIR_PIN = 7 | |
GPIO.setup(PIR_PIN, GPIO.IN) | |
try: | |
print ("Brew Counter (CTRL + C to exit)") | |
time.sleep(2) |
This file contains hidden or 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
from ubidots import ApiClient | |
import RPi.GPIO as GPIO | |
import time | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setup(7, GPIO.IN) | |
try: | |
api = ApiClient("d655b3fd31aa3267687ae30039ed00fec16a072e") | |
people = api.get_variable("53d82d7676254232ac805991") |
This file contains hidden or 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
@ini_set( ‘upload_max_size’ , ’3M’ ); | |
@ini_set( ‘post_max_size’, ’3M’); | |
@ini_set( ‘max_execution_time’, ’1000′ ); |
This file contains hidden or 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
<script type="text/javascript"> | |
// use strict | |
jQuery(document).ready(function ($) { | |
function fontFollow(shit, poop){ | |
// Pick the width of something that you want to match. | |
// This is an image that we're matching up here. | |
var ratioWidth = $(".ratio_element").outerWidth(); | |
// Divide the width into 100 tiny bits |