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
# This is a template .gitignore file for git-managed WordPress projects. | |
# | |
# Fact: you don't want WordPress core files, or your server-specific | |
# configuration files etc., in your project's repository. You just don't. | |
# | |
# Solution: stick this file up your repository root (which it assumes is | |
# also the WordPress root directory) and add exceptions for any plugins, | |
# themes, and other directories that should be under version control. | |
# | |
# See the comments below for more info on how to add exceptions for your |
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
// detect IE | |
var IEversion = detectIE(); | |
if (IEversion !== false) { | |
// document.getElementById('result').innerHTML = 'IE ' + IEversion; | |
document.getElementsByTagName("body")[0].classList.add("ie"); | |
document.getElementsByTagName("body")[0].classList.add("ie" + IEversion); | |
} else { | |
// document.getElementById('result').innerHTML = 'NOT IE'; | |
} |
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
package org.firstinspires.ftc.teamcode; | |
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; | |
import com.qualcomm.robotcore.eventloop.opmode.TeleOp; | |
import com.qualcomm.robotcore.hardware.DcMotor; | |
import com.qualcomm.robotcore.hardware.Servo; | |
/* ARM LIFT ALTERNATE : UNTESTED & NOT BUILT | |
---------------------------------------------------------- | |
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
package org.firstinspires.ftc.teamcode; | |
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode; | |
import com.qualcomm.robotcore.eventloop.opmode.Autonomous; | |
import com.qualcomm.robotcore.hardware.DcMotor; | |
/*Autonomous Code: | |
This code is assuming that the left motor is mounted backwards. If the right motor is mounted | |
backwards, commend out the line motorLeft.setDirection(DcMotor.Direction.REVERSE); and un-commend |
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
add_filter( 'wp_generate_attachment_metadata', 'tdp_create_pdf_thumbnail', 10, 2 ); | |
function tdp_create_pdf_thumbnail( $metadata, $attachment_id ) { | |
//Get the attachment/post object | |
$attachment_obj = get_post( $attachment_id ); | |
//Check for mime type pdf | |
if( 'application/pdf' == get_post_mime_type( $attachment_obj ) ) { |
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 | |
Copied from http://fatlabmusic.com/blog/2009/08/12/how-to-fix-wp-http-error-name-lookup-timed-out/ | |
//adjustments to wp-includes/http.php timeout values to workaround slow server responses | |
add_filter('http_request_args', 'bal_http_request_args', 100, 1); | |
function bal_http_request_args($r) //called on line 237 | |
{ | |
$r['timeout'] = 15; | |
return $r; | |
} | |
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
/* | |
This is taken directly from here and modified to fit our needs: https://developer.wordpress.org/themes/basics/including-css-javascript/ | |
*/ | |
function add_that_css_and_js() { | |
wp_enqueue_style( 'enqueue-that-css', get_template_directory_uri() . '/css/main.css', array(), '1.0', 'all'); | |
wp_enqueue_script( 'enqueue-that-js', get_template_directory_uri() . '/js/min/main.min.js', array ( 'jquery' ), 1.0, true); |
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
/** | |
* Wordrpess: Remove dnt from embedded vimeo video links | |
*/ | |
function tdp_remove_embed_url_dnt($provider, $url, $args){ | |
return add_query_arg( array('dnt' => false), $provider ); | |
} | |
add_filter('oembed_fetch_url', 'tdp_remove_embed_url_dnt', 10, 3); |