Skip to content

Instantly share code, notes, and snippets.

@bMinaise
bMinaise / age-verification.php
Created November 7, 2013 03:15
Gravity Form - Age Verification Function
<?php
// 1 - Tie our validation function to the 'gform_validation' hook
add_filter('gform_validation_47', 'validate_vin');
function validate_vin($validation_result) {
// 2 - Get the form object from the validation result
$form = $validation_result["form"];
// 3 - Get the current page being validated
@bMinaise
bMinaise / .htaccess
Created November 6, 2013 21:19
optimized .htaccess // May be a bit extreme ... Reduce time span if case.
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg “access 1 year”
ExpiresByType image/jpeg “access 1 year”
ExpiresByType image/gif “access 1 year”
ExpiresByType image/png “access 1 year”
ExpiresByType text/css “access 1 month”
ExpiresByType application/pdf “access 1 month”
ExpiresByType text/x-javascript “access 1 month”
@bMinaise
bMinaise / javascript-bp.md
Created November 6, 2013 06:12
JavaScript Style Guide
@bMinaise
bMinaise / footer.html
Created November 6, 2013 06:08
Bootstrap 3 - Footer Example
@bMinaise
bMinaise / index.html
Created November 6, 2013 06:06
Bootstrap 3 - Link Panel Possible to use for Events Page - Shelter 37
<div class="container">
<div class="row">
<div class="col-md-6">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">
<span class="glyphicon glyphicon-bookmark"></span> Quick Shortcuts</h3>
</div>
<div class="panel-body">
<div class="row">
@bMinaise
bMinaise / thumbs.css
Created November 6, 2013 06:10
Bootstrap 3 - Thumbnail Caption Hover Snippet by: sevenx.de
body {
padding-top: 50px;
}
.thumbnail {
position:relative;
overflow:hidden;
}
.caption {
<div class="container">
<div class="row-fluid pricing-table pricing-three-column">
<div class="span4 plan">
<div class="plan-name-bronze">
<h2>Bronze</h2>
<span>$8.99 / Month</span>
</div>
<ul>
<li class="plan-feature">10 Users</li>
<li class="plan-feature">5TB Disk Space</li>
<div class="container">
<div class="row-fluid">
<div class="span8">
<iframe width="100%" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.co.uk/maps?f=q&source=s_q&hl=en&geocode=&q=15+Springfield+Way,+Hythe,+CT21+5SH&aq=t&sll=52.8382,-2.327815&sspn=8.047465,13.666992&ie=UTF8&hq=&hnear=15+Springfield+Way,+Hythe+CT21+5SH,+United+Kingdom&t=m&z=14&ll=51.077429,1.121722&output=embed"></iframe>
</div>
<div class="span4">
<h2>Snail mail</h2>
<address>
<strong>Hythe Window Cleaning</strong><br>
<?php
/* Add a custom field to the field editor (See editor screenshot) */
add_action("gform_field_standard_settings", "my_standard_settings", 10, 2);
function my_standard_settings($position, $form_id){
// Create settings on position 25 (right after Field Label)
if($position == 25){
?>
@bMinaise
bMinaise / flying-focus.js
Created October 28, 2013 17:25
Focus Animation Transition Description: Animate keydown tab navigation - focus From http://n12v.com/focus-transition/flying-focus.js
(function() {
if (document.getElementById('flying-focus')) return;
var flyingFocus = document.createElement('flying-focus'); // use uniq element name to decrease the chances of a conflict with website styles
flyingFocus.id = 'flying-focus';
document.body.appendChild(flyingFocus);
var DURATION = 100;
flyingFocus.style.transitionDuration = flyingFocus.style.WebkitTransitionDuration = DURATION / 1000 + 's';