ffmpeg -i input.m3u8 -c copy -bsf:a aac_adtstoasc 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
export const pluralize = (number, cases) => { | |
number = Math.abs(number); | |
return cases[number % 100 > 4 && number % 100 < 20 ? 2 : [2, 0, 1, 1, 1, 2][number % 10 < 5 ? number % 10 : 5]]; | |
}; |
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
Number.prototype.toTimeFormat = function() { | |
var d = [Math.floor(this / 60 % 60), Math.floor(this % 60)], | |
h = Math.floor(this / 60 / 60 % 60); | |
d = d.map(function(n) {return n >= 10 ? n : "0" + n}); | |
h && d.unshift(h); | |
return d.join(":"); | |
}; | |
// using | |
var duration = 12345; |
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
Number.prototype.toData = function() { | |
if (this <= 0) { | |
return "0 bytes"; | |
}; | |
var n; | |
for (var i = 5; i >= 0; --i) { | |
n = Math.round(this / Math.pow(1024, i) * 10) / 10; | |
if (n >= 1) { | |
return n + " " + ["b", "KB", "MB", "GB", "TB"][i]); |
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 reArrayFiles(&$files) { | |
$result = []; | |
$keys = array_keys($files); | |
for ($i = 0, $l = sizeof($files["name"]); $i < $l; $i++) { | |
foreach ($keys as $key) { | |
$result[$i][$key] = $files[$key][$i]; | |
}; |
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 java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.io.PrintWriter; | |
import java.util.Scanner; | |
public class Gauss { | |
public static void swapRows(double[][] a, double[] b, int i, int j) { | |
double[] row = a[i]; |
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 | |
TOKEN="..." | |
echo "Enter URL to video (in format OID_VID)" | |
read vkUrl | |
#vkUrl="203384908_456239021" | |
hls=$(wget -qO - "https://api.vk.com/method/video.get?videos=$vkUrl&access_token=$TOKEN&v=5.56" | grep -iowE "hls\"\:\"http[^\"]*\"" | grep -iowE "http.[^\"]*" | sed 's!\\/!/!g') |
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
TARGET_BRANCH="master" | |
TEMPORARY_BRANCH="temp" | |
git branch "$TEMPORARY_BRANCH" | |
git checkout "$TEMPORARY_BRANCH" | |
git branch -f "$TARGET_BRANCH" "$TEMPORARY_BRANCH" | |
git checkout "$TARGET_BRANCH" | |
git branch -d "$TEMPORARY_BRANCH" |
-S
: Installing wiki
Install package
# pacman -S package
Sync (analog apt update
). Double y
- force sync.
OlderNewer