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
<?xml version="1.0"?> | |
<!-- MPD file Generated with GPAC version 0.7.1-revrelease at 2017-10-30T12:14:57.765Z--> | |
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" minBufferTime="PT1.500S" type="static" mediaPresentationDuration="PT2H32M53.000S" maxSegmentDuration="PT0H0M4.000S" profiles="urn:mpeg:dash:profile:full:2011"> | |
<ProgramInformation moreInformationURL="http://gpac.io"> | |
<Title>footballsm_dash.mpd generated by GPAC</Title> | |
</ProgramInformation> | |
<Period duration="PT2H32M53.000S"> | |
<AdaptationSet segmentAlignment="true" maxWidth="704" maxHeight="576" maxFrameRate="25" par="16:9" lang="und"> | |
<ContentComponent id="1" contentType="video" /> |
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
<!-- https://www.playframework.com/documentation/latest/SettingsLogger --> | |
<configuration> | |
<!-- Suppress logback complaining about multiple logback.xml files --> | |
<statusListener class="ch.qos.logback.core.status.NopStatusListener" /> | |
<conversionRule conversionWord="coloredLevel" converterClass="play.api.libs.logback.ColoredLevel" /> | |
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | |
<encoder> | |
<!-- We use short exception stack trace logging to limit output for travis. --> |
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
import scala.util.parsing.json.JSON | |
import scalaj.http.Http | |
// Assumes a list of objects. If response i only as single object, the last | |
// .asInstanceOf[Seq[Map[String, Any]]] could be changed to .asInstanceOf[Map[String, Any]] | |
def getService(serviceURL: String, serviceAuthToken: String): Seq[Map[String, Any]] = { | |
JSON.parseFull( | |
Http(serviceURL) | |
.timeout(connTimeoutMs = 600000, readTimeoutMs = 10000) |
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 | |
Log::info("something really interesting happened", ['extra' => 'information', 'about' => 'anything' ]); |
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 namespace CharityPress\Functions; | |
/** | |
* Enqueue scripts and styles. | |
*/ | |
class DashboardWidget extends Singleton { | |
//required function | |
public function init() { | |
add_action( 'wp_dashboard_setup', [ $this, 'intro_widget' ] ); |
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 | |
return [ | |
'version' => '1.0.0', | |
'table' => 'table_name', | |
'info' => [ | |
'item' => [ | |
'name' => 'cherry', | |
'value' => 'pick' | |
] |
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
NameVirtualHost *:80 | |
<VirtualHost *:80> | |
UseCanonicalName Off | |
ServerName vhosts.local.reasondigital.com | |
ServerAlias * | |
VirtualDocumentRoot /Users/mlaver/Projects/%1/htdocs/ | |
Options All ExecCGI FollowSymLinks +Includes | |
</VirtualHost> |
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
update table_name set option_value = replace(option_value,"oldurl.com","newurl.com"); |
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
// -------------------------------- | |
// load images from their data-src | |
// -------------------------------- | |
// - pure javascript | |
for (var i = document.querySelectorAll('[data-src]').length - 1; i >= 0; i--) { | |
var image = document.querySelectorAll('[data-src]')[i]; | |
image.src = image.getAttribute('data-src'); | |
}; | |
// - jQuery | |
$('[data-src]').each(function (){ |
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 createTemplateFromObject(template, data) { | |
var t = ''; | |
// For each item in the object, make the necessary replacement | |
for (key in data) { | |
console.log(key, data); | |
reg = new RegExp('{{' + key + '}}', 'ig'); | |
t = (t || template).replace(reg, data[key]); | |
} |
NewerOlder