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
# Serve .vtt files with Access-Control-Allow-Origin: * header if referer is the correct domain | |
<IfModule mod_setenvif.c> | |
<FilesMatch "\.vtt$"> | |
SetEnvIf Referer "^http(s)?://(.+\.)?somedomain\.com/" VALID_REFERER=$1 | |
Header set Access-Control-Allow-Origin "*" env=VALID_REFERER | |
</FilesMatch> | |
</IfModule> | |
You could also use origin |
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 | |
chdir('..'); | |
$output = array(); | |
exec('git log -15 --pretty=format:"%ad %an %s" --abbrev-commit --date=short', $output); | |
$history = array(); | |
foreach ($output as $line) { | |
$commit = array(); |
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
#!/bin/bash | |
LOADING=false | |
while [ $# -gt 0 ] ; do | |
case "$1" in | |
-h|--help) | |
echo "usage: $package [options] dbname" | |
echo " " | |
echo "OPTIONS:" |
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 | |
// Clean argument values | |
$phpStormRunner = null; | |
$cleanedArgv = array(); | |
foreach ($_SERVER['argv'] as $key => $value) { | |
if (strpos($value, 'ide-phpunit.php') === false) { | |
$cleanedArgv[] = $value; | |
} else { | |
$phpStormRunner = $value; | |
} |
NewerOlder