Skip to content

Instantly share code, notes, and snippets.

View arenadoon's full-sized avatar
✏️

Arena Artoon arenadoon

✏️
  • 01:16 (UTC +07:00)
View GitHub Profile
@sorokinvj
sorokinvj / How_to_enable_rc.local_with_Systemd.md
Last active September 2, 2024 20:53
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);
}
}
@ankitmundada
ankitmundada / download_gdrive
Last active April 17, 2022 23:11
Shell Script to download Publicly shared Google drive files
#!/bin/bash
# Get files from Google Drive
# Source: https://stackoverflow.com/a/50573452/2382312
# Usage: download_gdrive FILE_ID DESTINATION_PATH
# $1 = file ID
# $2 = file name
URL="https://drive.google.com/uc?export=download&id=$1"
@pinge
pinge / mobile.video.encoding.md
Last active March 12, 2025 18:50
Video and audio encoding for playback in Android and iOS devices

Video and audio encoding for playback in Android and iOS devices

This document aims to provide an easy way encode video optimized for playback in mobile devices that use the Android or the iOS operating systems.

libx264 is used for (single or two-pass) video encoding and libfdk_aac for audio encoding.

ffmpeg, libx264 and libfdk_aac settings are optimized for playback quality and compatibility on Android and iOS. There is extensive documentation and references for each of the settings used and contributions are very welcome :)

@stawidy
stawidy / speedtest-server-list.txt
Created December 27, 2018 04:44
Speedtest 节点列表
17584) Chongqing Mobile Company (Chongqing, CN)
5726) China Unicom Chong Qing Branch (Chongqing, China)
5530) CCN (Chongqing, China)
19076) China Telecom (ChongQing, China)
20054) YunJinTianFu (Chengdu, China)
11444) University of Electronic Science and Technology of China (Chengdu, China)
2461) China Unicom (Chengdu, China)
4575) China Mobile Group Sichuan (Chengdu, China)
16398) China Mobile,GuiZhou (Guiyang, China)
5292) China Mobile Group Shaanxi Company Limited (Xi'an, China)
@BurakBoz
BurakBoz / allow
Last active July 18, 2020 12:22 — forked from Nilpo/allow
CSF Allow AND Ignore Cloudflare IP's.
for i in `curl https://www.cloudflare.com/ips-v4`; do csf -a $i; done
for i in `curl https://www.cloudflare.com/ips-v6`; do csf -a $i; done
# Kernel sysctl configuration file for Linux
#
# Version 1.16 - 2018-10-23
# Michiel Klaver - IT Professional
# Modified by VirtuBox
#
# Instructions available on https://github.com/VirtuBox/ubuntu-nginx-web-server
#
# Sources :
# https://klaver.it/linux/sysctl.conf
@Justsoos
Justsoos / p.sh
Last active February 3, 2023 02:31
proxychains CLI wrapper (updated)
#!/bin/sh
# proxychains wrapper
# Choose pre-supposed profile with -1,-2,-3 OR appoint by -n proxy(Node)_ip(hostname):port and -p proxy_protocol and -q as quiet mode
# Default profile
proxy_hostname=127.0.0.1
proxy_port=1080
protocol=socks5
# profile 1
proxy_hostname_1=127.0.0.1
@JiveDig
JiveDig / functions.php
Last active December 1, 2022 21:24
Get the primary term of a post, by taxonomy. If Yoast Primary Term is used, return it, otherwise fallback to the first term.
<?php
/**
* Gets the primary term of a post, by taxonomy.
* If Yoast Primary Term is used, return it,
* otherwise fallback to the first term.
*
* @version 1.3.0
*
* @link https://gist.github.com/JiveDig/5d1518f370b1605ae9c753f564b20b7f
@CSRaghunandan
CSRaghunandan / nginx.conf
Last active March 23, 2025 09:54
Nginx configuration for serving mp4 videos
#user nobody;
worker_processes 4;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;