Skip to content

Instantly share code, notes, and snippets.

View arenadoon's full-sized avatar
✏️

Arena Artoon arenadoon

✏️
  • 08:02 (UTC +07:00)
View GitHub Profile
@chemputer
chemputer / install_ffmpeg_libfdkaac.sh
Last active January 6, 2024 04:35 — forked from chrisvaughn/install_ffmpeg_libfdkaac.sh
Install FFmpeg with libfdk_aac support (For Ubuntu)
# Criando um script .sh para executar todos os comandos:
#root@servidor:~# vi script.sh
#root@servidor:~# chmod +x script.sh
#root@servidor:~# ./script.sh
apt-get update
apt-get -y install autoconf automake build-essential git-core libass-dev libgpac-dev libsdl1.2-dev libtheora-dev libtool libvdpau-dev libvorbis-dev libx11-dev libxext-dev libxfixes-dev pkg-config texi2html zlib1g-dev libmp3lame-dev nasm gcc yasm && true
mkdir ~/ffmpeg_sources
cd ~/ffmpeg_sources
git clone --depth 1 git://github.com/mstorsjo/fdk-aac.git
@reduardo7
reduardo7 / gdrive-upload.sh
Last active March 4, 2024 09:15
Upload to Google Drive.
#!/usr/bin/env bash
# https://towardsdatascience.com/uploading-files-to-google-drive-directly-from-the-terminal-using-curl-2b89db28bb06
# Require "curl"
# $ sudo apt install curl # Linux Debian/Ubuntu
# $ brew install curl # Mac
_err() {
echo >&2 "Error! $*"
@fschiettecatte
fschiettecatte / HighTrafficServerSettings.md
Last active January 22, 2024 21:31
High Traffic Server Settings on RHEL / AlmaLinux / Rocky / EuroLinux / CentOS 8

High Traffic Server Settings on RHEL / AlmaLinux / Rocky / EuroLinux / CentOS 8

I recently did some work to optimize the network configuration of an AlmaLinux 8 based web server that receives a lot of traffic.

Of course these settings also apply to RHEL / Rocky / EuroLinux / CentOS 8 (hereafter referred to as Linux 8.) I think these should also work on RHEL / AlmaLinux / Rocky / EuroLinux 9 as well but I have not yet tested them.

There is a lot of information on the web for this and it distills down to a minimum recommended configuration, and a recommended configuration.

The minimum recommended configuration should be sufficient for servers with less than 10Gb, and the recommended configuration should be sufficient for servers with 10Gb or more.

@coder618
coder618 / Wordpress Remove all unnecessary tags from head
Created August 3, 2020 12:36
this pieces of code will remove all unnecessary tags from which generated between <head></head> by WordPress. Use with caution
add_action( 'after_setup_theme', 'prefix_remove_unnecessary_tags' );
function prefix_remove_unnecessary_tags(){
// REMOVE WP EMOJI
remove_action('wp_head', 'print_emoji_detection_script', 7);
remove_action('wp_print_styles', 'print_emoji_styles');
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
@maitrungduc1410
maitrungduc1410 / create-vod-hls-gpu.sh
Last active September 2, 2023 08:54
Bash scripts to create VOD HLS stream with ffmpeg using GPU
#!/usr/bin/env bash
START_TIME=$SECONDS
set -e
echo "-----START GENERATING HLS STREAM-----"
# Usage create-vod-hls-gpu.sh SOURCE_FILE [OUTPUT_NAME]
[[ ! "${1}" ]] && echo "Usage: create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME]" && exit 1
# comment/add lines here to control which renditions would be created
renditions=(
@maitrungduc1410
maitrungduc1410 / create-vod-hls.sh
Last active March 1, 2024 22:29
Bash scripts to create VOD HLS stream with ffmpeg (Extended version)
#!/usr/bin/env bash
START_TIME=$SECONDS
set -e
echo "-----START GENERATING HLS STREAM-----"
# Usage create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME]
[[ ! "${1}" ]] && echo "Usage: create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME]" && exit 1
# comment/add lines here to control which renditions would be created
renditions=(
@akshay-sihag
akshay-sihag / primary_category_shortcode.php
Created January 14, 2020 21:04
Display Primary Category (Yoast's WordPress SEO) with the help of a shortcode
// Creating Shortcode to display Yoast SEO Primary Category
// Add Shortcode
function get_yoast_primary_cat() {
$category = get_the_category();
$useCatLink = true;
// If post has a category assigned.
if ($category){
$category_display = '';
@chrisvaughn
chrisvaughn / install_ffmpeg_libfdkaac.sh
Last active January 6, 2024 04:35 — forked from rafaelbiriba/install_ffmpeg_libfdkaac.sh
Install FFmpeg with libfdk_aac support (For Ubuntu)
# Criando um script .sh para executar todos os comandos:
#root@servidor:~# vi script.sh
#root@servidor:~# chmod +x script.sh
#root@servidor:~# ./script.sh
apt-get update
apt-get -y install autoconf automake build-essential git-core libass-dev libgpac-dev libsdl1.2-dev libtheora-dev libtool libvdpau-dev libvorbis-dev libx11-dev libxext-dev libxfixes-dev pkg-config texi2html zlib1g-dev libmp3lame-dev nasm gcc yasm && true
mkdir ~/ffmpeg_sources
cd ~/ffmpeg_sources
git clone --depth 1 git://github.com/mstorsjo/fdk-aac.git
@sorokinvj
sorokinvj / How_to_enable_rc.local_with_Systemd.md
Last active March 6, 2024 21:42
How to Enable /etc/rc.local with Systemd

from here – https://www.linuxbabe.com/linux-server/how-to-enable-etcrc-local-with-systemd

How to Enable /etc/rc.local with Systemd

If you are running a Linux distro that uses Systemd, then you may find that your command in /etc/rc.local file would not run on system boot. This guide explains how to enable /etc/rc.local script to run on system startup. If you type the following command in terminal:

sudo systemctl status rc-local
@robwent
robwent / functions.php
Created April 17, 2019 19:16
Remove Yoast HTML Comments “This site is optimized with the Yoast WordPress SEO plugin” with Yoast v11
//Remove Yoast HTML Comments
//https://gist.github.com/robwent/f36e97fdd648a40775379a86bd97b332
function go_yoast() {
if (defined('WPSEO_VERSION')){
add_action('get_header',function (){ ob_start(function ($o){
return preg_replace('/\n?<.*?Yoast SEO plugin.*?>/mi','',$o); }); });
add_action('wp_head',function (){ ob_end_flush(); }, 999);
}
}