Skip to content

Instantly share code, notes, and snippets.

Avatar

Donn Hill hillbilly

View GitHub Profile
@hillbilly
hillbilly / Taco-v5.php
Last active Feb 3, 2017
Taconite xml files from php
View Taco-v5.php
<?php
/**
* ----------------------------------------------------------------------------
*
* The Software shall be used for Good, not Evil... bad eval
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
@hillbilly
hillbilly / assetmanage
Created Sep 19, 2011
Apache htaccess server gz javascript # and css files.
View assetmanage
<files *.js.gz>
ForceType text/javascript
Header set Content-Encoding: gzip
</files>
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} !".*Safari.*"
RewriteCond %{HTTP_USER_AGENT} !".*MSIE.*"
RewriteCond %{HTTP:Accept-Encoding} gzip
@hillbilly
hillbilly / queryBrowser.js
Created Sep 19, 2011
Append element with the features of the browser - tested with Firefox, Chrome, IE-7/8/9
View queryBrowser.js
<script type="text/javascript">
<!--//--><![CDATA[//><!--
jQuery(document).ready(function($){
queryBrowser( "#idOfTextareaElement" );
function queryBrowser(element)
{
var target = $(element);
if( target.length > 0 )
@hillbilly
hillbilly / pdfcachebust.js
Created Jul 23, 2012
pdf documents will have a cache busting
View pdfcachebust.js
<script type="text/javascript">
jQuery(document).ready(function($){
// All pdf documents will have a cache busting
// string added to its url
$("a[href $='.pdf']").click(function(){
var now = new Date().getTime();
View adwords_ajax_form_success.js
<!-- Google Code for Contact Page Conversion Page -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = XXXXXXXXXXXX;
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = " XXXXXXXXXXXX";
var google_conversion_value = 0;
/* ]]> */
View div-extended.php
<?php
/**
* Divi modifications to the new Divi PageBuilder
*/
function my_cutom_et_modules() {
if( class_exists("ET_Builder_Module") ){
class ET_Builder_Module_Image_2 extends ET_Builder_Module {
@hillbilly
hillbilly / remove_Open_Sans_from_Wordpress.php
Created May 9, 2016
Remove Open-Sans font from Wordpress
View remove_Open_Sans_from_Wordpress.php
function remove_open_sans() {
wp_deregister_style( 'open-sans' );
wp_register_style( 'open-sans', false );
}
add_action( 'wp_print_styles', 'remove_open_sans' );
You can’t perform that action at this time.