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 | |
header("Content-type: text/xml"); | |
$feed_name = "My Audio Feed"; | |
$feed_description = "Feed for the my audio files in some server folder"; | |
$base_url = strtok('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], '?'); //gets the current page's url. strips off the url's parameters | |
$allowed_extensions = array('mp4','mp3'); | |
?> | |
<?php echo '<?xml version="1.0"?>'; //we have to use php to output the "<?" ?> | |
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> |
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 | |
if(!isset($_POST["input"])|$_POST["input"]==""){ //check to see if the url is set. if not set prompts for a url. | |
?>Clean: | |
<form action="index.php" method="post"> | |
<textarea name="input" rows="40" cols="80"></textarea><br><br> | |
<input type="submit"> | |
</form><?php | |
exit(); | |
}else{ | |
$input = htmlspecialchars_decode($_POST["input"]); |
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
I'm using this to get away from Enfold and Devi which marks everything up with hundreds of shortcodes. This will output ugly html, but at least it's html. | |
In wp-admin/includes/export.php change this line: | |
$content = wxr_cdata( apply_filters( 'the_content_export', $post->post_content ) ); | |
To: | |
$content = wxr_cdata( apply_filters( 'the_content_export', do_shortcode( $post->post_content ) ) ); | |
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 | |
// Converts to proper case, deals with some edge cases, and capitalizes many medical acronyms. | |
// this assumes that the title is completely uppercase or completely lowercase that we get no hints | |
function proper_case($title) | |
{ | |
// http://www.superheronation.com/2011/08/16/words-that-should-not-be-capitalized-in-titles/#comment-1945084 | |
$lowercase_words = array('a ', 'aboard ', 'about ', 'above ', 'across ', 'after ', 'against ', 'along ', 'amid ', 'among ', 'an ', 'and ', 'anti ', 'around ', 'as ', 'at ', 'before ', 'behind ', 'below ', 'beneath ', 'beside ', 'besides ', 'between ', 'beyond ', 'but ', 'by ', 'concerning ', 'considering ', 'despite ', 'down ', 'during ', 'except ', 'excepting ', 'excluding ', 'following ', 'for ', 'from ', 'in ', 'inside ', 'into ', 'like ', 'minus ', 'near ', 'of ', 'off ', 'on ', 'onto ', 'opposite ', 'or ', 'outside ', 'over ', 'past ', 'per ', 'plus ', 'regarding ', 'round ', 'save ', 'since ', 'so ', 'than ', 'the ', 'through ', 'to ', 'toward ', 'towards ', 'unde |
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 | |
if [ ! -d "../thumb" ] | |
then | |
mkdir ../thumb | |
fi | |
for i in * | |
do | |
if [[ $i == *.RWZ ]] || [[ $i == *.RW2 ]] || [[ $i == *.CR2 ]] || [[ $i == *.DNG ]] || [[ $i == *.ARW ]] || [[ $i == *.ERF ]] || [[ $i == *.NRW ]] || [[ $i == *.RAF ]] || [[ $i == *.NEF ]] || [[ $i == *.K25 ]] || [[ $i == *.DNG ]] || [[ $i == *.SRF ]] || [[ $i == *.EIP ]] || [[ $i == *.DCR ]] || [[ $i == *.RAW ]] || [[ $i == *.CRW ]] || [[ $i == *.3FR ]] || [[ $i == *.BAY ]] || [[ $i == *.MEF ]] || [[ $i == *.CS1 ]] || [[ $i == *.KDC ]] || [[ $i == *.ORF ]] || [[ $i == *.ARI ]] || [[ $i == *.SR2 ]] || [[ $i == *.MOS ]] || [[ $i == *.MFW ]] || [[ $i == *.CR3 ]] || [[ $i == *.FFF ]] || [[ $i == *.SRW ]] || [[ $i == *.J6I ]] || [[ $i == *.X3F ]] || [[ $i == *.KC2 ]] || [[ $i == *.RWL ]] || [[ $i == *.MRW ]] || [[ $i == *.PEF ]] || [[ $i == *.IIQ ]] || [[ $i == *.CXI ]] || [[ $i == *.MDC ]] |
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
ffmpeg -i input-without-subs.mp4 -c:v libx264 -vb 20M -c:a copy -vf subtitles=subs.srt output-with-subs.mp4 | |
To change the font size use this one: | |
ffmpeg -i input.mp4 -c:a copy -c:v libx264 -vb 20M -vf "subtitles=try_1.en_us.srt:force_style='Fontsize=24'" output-with-subs.mp4 | |
To do a two pass encode while hardcoding subs: | |
ffmpeg -y -i input.mp4 -vf subtitles=subs.srt -c:v libx264 -b:v 5000k -pass 1 -an -f mp4 /dev/null | |
ffmpeg -y -i input.mp4 -vf subtitles=subs.srt -c:v libx264 -b:v 5000k -pass 2 -c:a copy output.mp4 |
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
remove huge peaks if not in speaking areas | |
favorites: normalize to -0.1db | |
effects rack slot 2 - hard limiter: | |
-0.1 maximum amplitude | |
0 input boost | |
7 look ahead time | |
100 release time |
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 | |
$folder = "."; | |
$free = disk_free_space($folder); | |
$total = disk_total_space($folder); | |
echo '<strong>Free Space:</strong> ' . formatBytes($free) . ' (' . round( ($free / $total) * 100 , 1) . '%)<br>'; | |
echo '<strong>Total Space:</strong> ' . formatBytes($total); |
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 | |
$root = '.'; | |
$min_size = 10485760; | |
/* in bytes. | |
1 mb = 1048576 | |
10 mb = 10485760 | |
100 mb = 104857600 | |
1 gb = 1048576000 | |
*/ |
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
<pre> | |
<?php | |
//ARE YOU SURE YOU WANT TO DELETE EVERYTHING??? | |
$rii = new RecursiveIteratorIterator(new RecursiveDirectoryIterator('.')); | |
foreach ($rii as $file) { | |
echo $file->getPathname() . "<br>"; |
OlderNewer