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
#!/bin/bash | |
# ALL SOURCE VIDEOS MUST HAVE AN .mp4 EXTENSION | |
# If you have different filetypes, edit the hardcoded extension 3 lines below this one | |
mkdir -p Converted | |
for file in *.mp4; do | |
echo Processing $file | |
ffmpeg -i "$file" -vf "scale='if(gt(iw/ih,1920/808),1920,-1)':'if(gt(iw/ih,1920/808),-1,808)',pad=1920:808:(1920-iw)/2:(808-ih)/2:black,pad=1920:1080:0:272:white" -c:a copy -an "Converted/$file" > /dev/null 2>&1 | |
done |
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
Options -Indexes | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-di | |
RewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L] |
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 | |
$files = array_diff(scandir('.'), array('.', '..')); //Exclude current and parent folder | |
//Get the current directory to output proper link addresses | |
$currentDir = $_SERVER['REQUEST_URI']; | |
$noProtocolUrl = (strpos($currentDir, '//') !== false) ? substr($currentDir, strpos($currentDir, '//')) : $currentDir; | |
$urlParts = explode('/', $noProtocolUrl); | |
if (empty($urlParts[count($urlParts) - 1])) { | |
//The URL is ending with a trailing slash | |
$currentDir = rtrim($currentDir, '/'); |
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
/** | |
* @author Jan Štěch | |
* @return array[] Asociativní pole s otázkou (slovem) i odpovědí (číslem) - otázka pod indexem "q", odpověď pod indexem "a" | |
*/ | |
function numberAsWord() | |
{ | |
$digits = explode(',','nula,jedna,dva,tři,čtyři,pět,šest,sedm,osm,devět'); | |
$tens = explode(',', 'nula,deset,dvacet,třicet,čtyřicet,padesát,šedesát,sedmdesát,osmdesát,devadesát'); | |
$number = rand(0,99); |
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
/* | |
A program to convert a palette file written with decimal RGB values to a palette file written with hex RGB values. | |
Input file format: | |
RED GREEN BLUE | |
RED GREEN BLUE | |
... | |
Output file format: | |
RRGGBB | |
RRGGBB | |
... |
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
function getRandomDate($minYear = 1980, $minMonth = 1, $minDay = 1, $minHour = 0, $minMinute = 0, $minSecond = 0, $maxYear = 2019, $maxMonth = 12, $maxDay = 31, $maxHour = 23, $maxMinute = 59, $maxSecond = 59) | |
{ | |
$year = rand($minYear, $maxYear); | |
$month = rand($minMonth, $maxMonth); | |
$day = rand($minDay, $maxDay); | |
$hour = rand($minHour, $maxHour); | |
$minute = rand($minMinute, $maxMinute); | |
$second = rand($minSecond, $maxSecond); | |
if ($month < 10){$month = '0'.$month;} |
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
using System; | |
using System.IO; | |
namespace Kasiopea_1_Pocty | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Console.ForegroundColor = ConsoleColor.Gray; |