A Pen by João Sardinha on CodePen.
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
var videoPlayerEmbed = jQuery('#playerID'); // Get player embed | |
var videoURL = videoPlayerEmbed.prop('src'); // Get current src | |
videoURL = videoURL.replace("&autoplay=1", ""); // Remove autoplay if exists | |
videoPlayerEmbed.prop('src',''); // Remove src to reset | |
videoPlayerEmbed.prop('src',videoURL); // Add src again, resetting |
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 | |
class BaseModel implements ArrayAccess { | |
public $attributes = array(); | |
public $attributes_cast_as = array(); // key => closure returning the value | |
public $attributes_cast_as_integer = array(); | |
public $attributes_cast_as_float = array(); | |
public $attributes_cast_as_string = array(); |
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
jQuery.fn.extend({ | |
addClassWithAnimationContext: function(className, callback) { | |
return this.each(function(index, element) { | |
var self = jQuery(element); | |
// Exit if already has class | |
if ( self.hasClass(className) ) { | |
return; | |
} |
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
// Disable magic quotes | |
if (get_magic_quotes_gpc()) { | |
$process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST); | |
while (list($key, $val) = each($process)) { | |
foreach ($val as $k => $v) { | |
unset($process[$key][$k]); | |
if (is_array($v)) { | |
$process[$key][stripslashes($k)] = $v; | |
$process[] = &$process[$key][stripslashes($k)]; | |
} else { |
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
global $wpdb; | |
$selected_range_number = intval(100); // Km | |
$query_lat = str_replace(',', '.', strval($selected_address_lat_lng['lat'])); | |
$query_lng = str_replace(',', '.', strval($selected_address_lat_lng['lng'])); | |
$query_by_distance = sprintf(' | |
SELECT | |
p.*, |
What have I learned so far?
(The android situations were experienced using 4.1.1)
The general support is good, as a background and with an svg file being used as src
in an <img>
tag.
However there are some issues still.
In android, SVG files used with <img>
tags may appear stragely, or dont appear at all.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<style> | |
body { font-family: Helvetica; line-height: 1.3em; padding: 1em 10%; } | |
</style> | |
</head> | |
<body> |
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
setfacl -d --recursive -m g::rx :dir | |
setfacl -d --recursive -m o::rx :dir |
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 | |
$config = array( | |
'name' => 'Project Name', | |
'id' => 'project-id', | |
// (bool) If false, will only generate the sql file and will not import to destination server | |
'import' => true, | |
// Usually the remote connection |