View miva-address-autocomplete.js
var mvGAAC = {
init: function(){
$.getScript('//cdnjs.cloudflare.com/ajax/libs/geocomplete/1.6.5/jquery.geocomplete.min.js', mvGAAC.loaded);
},
loaded: function(){
$('.js-geocomplete-input')
.geocomplete()
.bind('geocode:result', mvGAAC.result);
},
result: function(event, result){
View miva-json-encoding.html
<mvt:item name="toolkit" param="headeroutput|Content-Type|application/json" />
<mvt:item name="powrsrch" param="picklist|10" />
<mvt:if expr="l.settings:picklist">
[
<mvt:foreach iterator="pick" array="picklist">
<mvt:item name="toolkit" param="json_encode|l.all_settings:pick:term|l.all_settings:pick:term" />
<mvt:if expr="pos1 EQ 1">
{"term": ""}
<mvt:else>
,{"term": ""}
View select-html-text-with-javascript.html
<!-- FROM: http://us5.campaign-archive1.com/?u=ea228d7061e8bbfa8639666ad&id=c53c1e7832&e=ff0570c0b6 -->
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<input value="Web Tools Weekly" id="textField">
View wordpress-custom-post-type-example.php
<?
/*
Plugin Name: My Custom Post Type
Plugin URI: http://wp.smashingmagazine.com/2012/11/08/complete-guide-custom-post-types/
Version: 1.0
Author: Steven Soule
Author URI: http://www.stevensoule.com
*/
/*function my_custom_post_product() {
View php-process-access-log.php
<?
// process_file("sample.txt");
process_file("access_log.txt");
function process_file($file = 'sample.txt')
{
// Declare Variables
$total_bytes = 0;
$graphic_bytes = 0;
$line_count = 0;
View htaccess-gzip-compression.text
<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>
View css-vertically-align-element.css
/* http://zerosixthree.se/vertical-align-anything-with-just-3-lines-of-css/ */
.element {
position: relative;
top: 50%;
transform: translateY(-50%);
}
View sass-vertical-align-mixin.scss
/* http://zerosixthree.se/vertical-align-anything-with-just-3-lines-of-css/ */
@mixin vertical-align {
position: relative;
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
}
.element p {
View using-full-screen-mode.html
<!-- https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Using_full_screen_mode -->
<video controls id="myvideo">
<source src="somevideo.webm"></source>
<source src="somevideo.mp4"></source>
</video>
<script>
// We can put that video into fullscreen mode with script like this:
var elem = document.getElementById("myvideo");
if (elem.requestFullscreen) {
elem.requestFullscreen();
View listrak-newsletter-subsribe.html
<!-- Listrak Professional Services - Subscribe-->
<script type="text/javascript">
_ltk.Subscriber.List = "Prod_Reg";
_ltk.Subscriber.Email = "Email Address Goes Here";
_ltk.Subscriber.Profile.Add("CheckBox.Source.Product Registrations", "on");
_ltk.Subscriber.Submit();
</script>