echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
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/sh | |
cp_p() | |
{ | |
strace -q -ewrite cp -- "${1}" "${2}" 2>&1 \ | |
| awk '{ | |
count += $NF | |
if (count % 10 == 0) { | |
percent = count / total_size * 100 | |
printf "%3d%% [", percent | |
for (i=0;i<=percent;i++) |
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 | |
##### | |
#### GPG-AGENT stuff | |
####GET_TTY=`tty` | |
####export $GET_TTY | |
####$HOME/<somercdir>/gpg-agent-start.sh | |
##### | |
# Decide wether to start gpg-agent daemon. |
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.Net; | |
using System.Threading; | |
using System.Net.Sockets; | |
class test2 { | |
private static readonly string[] listA = new string[] {"173.194.00.001", "72.233.127.00", "2607:f8b0:4003:c00::6a", "foo"}; | |
private static bool IsIP4; | |
private static bool isUp; |
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 | |
# remove all paths passed as arguments from the history of the repo | |
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch config/*.ini" HEAD | |
# remove the temporary history git-filter-branch otherwise leaves behind for a long time | |
rm -rf .git/refs/original/ && git reflog expire --all && git gc --aggressive --prune | |
git filter-branch -f --index-filter "git rm --cached --ignore-unmatch app/config/*.ini" --prune-empty -- --all | |
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/sh | |
#Check the Drive Space Used by Cached Files | |
du -sh /var/cache/apt/archives | |
#Clean all the log file | |
#for logs in `find /var/log -type f`; do > $logs; done | |
logs=`find /var/log -type f` | |
for i in $logs |
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
alias gi='~/git-info.sh' |
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
#!/usr/bin/env bash | |
#find /var/www/ -name "*.png" -print0 | xargs -0 sudo chmod +w *.png | |
find /var/www/ -name "*.png" -print0 | xargs -0 sudo optipng -o7 | |
#find /var/www/ -name "*.jpg" -print0 | xargs -0 sudo chmod +w *.jpg | |
find /var/www/ -name "*.jpg" -print0 | xargs -0 sudo jpegoptim -m 90 -t |
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
#!/usr/bin/env bash | |
#Credit to @rafaelbiriba and @dustball | |
export BASE=/opt | |
echo "deb http://www.deb-multimedia.org stretch main non-free" >> /etc/apt/sources.list | |
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 5C808C2B65558117 | |
apt-get update | |
apt-get -y install build-essential autoconf automake cmake libtool git \ |
- Based on https://gist.github.com/GAS85/990b46a3a9c2a16c0ece4e48ebce7300
- This totorial is for an older Ubuntu 18.04, for a Ubuntu 20.04 please read here --> https://gist.github.com/GAS85/38eb5954a27d64ae9ac17d01bfe9898c
- A self-managed VPS or dedicated server with Ubuntu 18.04 running Apache 2.4.xx.
- A registered domain name with working HTTPS (TLS/SSL). HTTP/2 only works alongside HTTPS because most browsers, including Firefox and Chrome, don’t support HTTP/2 in cleartext (non-TLS) mode.