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 | |
add_action("gform_field_input", "ih_gform_field_input", 10, 5); | |
function ih_gform_field_input($input, $field, $value, $lead_id, $form_id){ | |
//wp_debug($field); | |
if($field["type"] == "vehicleyear"){ | |
//wp_debug($field['choices']); | |
//$input = 'Aha!'; | |
} | |
return $input; | |
} |
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
bind_searchbar: function() { | |
var cooq = this, | |
input = $("#search"), | |
results = [], | |
results_element = '.live-search-results', | |
current_element = null, | |
show_search_help = null, | |
hide_search_help = null; | |
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
// main.js | |
function loadGoogleMapsApi(){ | |
if(typeof google === "undefined"){ | |
var script = document.createElement("script"); | |
script.src = "https://maps.google.com/maps/api/js?sensor=false&callback=loadGoogleMapsApiReady"; | |
document.getElementsByTagName("head")[0].appendChild(script); | |
} else { | |
loadGoogleMapsApiReady(); | |
} | |
} |
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 | |
#Replace ?mysite\.com/ with your blog url | |
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mysite\.com/ [NC] | |
RewriteCond %{HTTP_REFERER} !^$ | |
#Replace /images/nohotlink.jpg with your "don't hotlink" image url | |
RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/nohotlink.jpg [L] |
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
{ | |
"index": { | |
"title": "Hello World" | |
} | |
} |
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
/** | |
* (C)Leanest CSS spinner ever | |
*/ | |
@keyframes spin { | |
to { transform: rotate(1turn); } | |
} | |
.progress { | |
position: relative; |
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 paths = [], files = []; function recursiveTree(obj) { if (typeof obj == "object" && !obj.length) { for (item in obj) { if (item === "contents") { recursiveTree(obj[item]); } else if (item != "data") { paths.push(item); recursiveTree(obj[item]); paths.splice(paths.length-1, 1); } } } else if (typeof obj == "object") { for (i in obj) { var file = obj[i]; if (/(\.html$)/.test(file)) { paths.push(file); files.push("/" + paths.join("/")); paths.splice(paths.length-1, 1); } } } }; recursiveTree(public); | |
xml | |
urlset(xmlns="http://www.sitemaps.org/schemas/sitemap/0.9") | |
- for(i in files) { | |
url | |
loc= files[i] | |
priority 0.5 | |
- } |
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
/* | |
* Helper method to avoid Backbone wrapping empty element | |
*/ | |
Backbone.View.prototype.replaceElement = function (html) { | |
if (typeof html === "string") { | |
html = $(html); | |
} | |
this.$el.replaceWith(html); | |
$(this.el).undelegate(); | |
this.setElement(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
/^\/(gallery|catalog|about)/.test(current.source) |
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 excerpt(markup) { | |
- return markup.split("<!-- more -->")[0] | |
- } | |
.blog.summary | |
ul | |
each post, slug in public.posts.data | |
li | |
h3 #{post.title} | |
p.byline |
NewerOlder