Skip to content

Instantly share code, notes, and snippets.

View arenadoon's full-sized avatar
✏️

Arena Artoon arenadoon

✏️
  • 22:34 (UTC +07:00)
View GitHub Profile
@arenadoon
arenadoon / fa-link
Created March 29, 2024 21:30 — forked from Alecto/font-awesome-link-code
Fontawesome link code
@arenadoon
arenadoon / os.sh
Last active April 13, 2024 21:50 — forked from vintagewang/os.sh
Kernel sysctl configuration file for Linux
#!/bin/sh
echo '# ======================ของเซิฟตัวเล่น======================' >> /etc/sysctl.d/99-linux.internal.conf
echo '# sysctl settings are defined through files in' >> /etc/sysctl.d/99-linux.internal.conf
echo '# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.' >> /etc/sysctl.d/99-linux.internal.conf
echo '#' >> /etc/sysctl.d/99-linux.internal.conf
echo '# Vendors settings live in /usr/lib/sysctl.d/.' >> /etc/sysctl.d/99-linux.internal.conf
echo '# To override a whole file, create a new file with the same in' >> /etc/sysctl.d/99-linux.internal.conf
echo '# /etc/sysctl.d/ and put new settings there. To override' >> /etc/sysctl.d/99-linux.internal.conf
echo '# only specific settings, add a file with a lexically later' >> /etc/sysctl.d/99-linux.internal.conf
@arenadoon
arenadoon / install_ffmpeg_libfdkaac.sh
Last active August 5, 2024 04:33 — forked from chemputer/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
sudo yum groupinstall "Development Tools"
sudo yum install -y yasm cmake libtool unzip wget
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
@arenadoon
arenadoon / install_ffmpeg_libfdkaac.sh
Created June 22, 2024 20:03 — forked from chemputer/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
# Hard-code DNS resolver to Google's servers
#
# *Setup*
# # download this file while DNS is working
# curl https://gist.github.com/turadg/7876784/raw --output ~/google-resolv.conf
# # replace your old DNS resolver
# sudo cp /etc/resolv.conf /etc/resolv.conf.auto && sudo mv ~/google-resolv.conf /etc/resolv.conf
# # make it uneditable so Vagrant doesn't clobber it
# sudo chattr +i /etc/resolv.conf
@arenadoon
arenadoon / secure_link.md
Created July 22, 2024 07:02 — forked from goregrish/secure_link.md
Nginx ngx_http_secure_link_module and PHP
@arenadoon
arenadoon / README.md
Created July 22, 2024 07:54 — forked from mrbar42/README.md
Secured HLS setup with Nginx as media server

Secured HLS setup with Nginx as media server

This example is part of this article.

This is an example for an HLS delivery with basic security. Nginx compiled with nginx-rtmp-module & secure-link is used as media server. Features:

  • Domain filtering
  • Referrer filtering
  • Embed buster
@arenadoon
arenadoon / toggle_swap.sh
Last active August 23, 2024 11:35 — forked from Jekis/toggle_swap.sh
Empty swap. Clear swap. Move swap to RAM. Ubuntu.
#!/bin/bash
#https://gist.github.com/arenadoon/27fc93713c05a89bda5466e273137844 <--my
#https://gist.github.com/Jekis/6c8fe9dfb999fa76479058e2d769ee5c <--Default
function echo_mem_stat () {
mem_total="$(free | grep 'Mem:' | awk '{print $2}')"
free_mem="$(free | grep 'Mem:' | awk '{print $7}')"
mem_percentage=$(($free_mem * 100 / $mem_total))
swap_total="$(free | grep 'Swap:' | awk '{print $2}')"