Skip to content

Instantly share code, notes, and snippets.

View arenadoon's full-sized avatar
✏️

Arena Artoon arenadoon

✏️
  • 14:19 (UTC +07:00)
View GitHub Profile
@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 19, 2024 20:06
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 April 20, 2024 19:47
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;
@Bartvelp
Bartvelp / stream.php
Created May 10, 2018 17:13
PHP seekable stream external video with url and range header support
<?php
/*
Hi!
So this gist is not a very good implementation, it works great in chrome but the seeking is sort of glitched in firefox.
But it does the job and I hope it can help out!
(Please let me know how to improve this)
*/
ini_set('max_execution_time', 0);
$url = "http://mirrors.standaloneinstaller.com/video-sample/jellyfish-25-mbps-hd-hevc.m4v"; //just some sample url, please dont overload their servers
@magnific0
magnific0 / traffic-control.sh
Created December 1, 2017 12:37 — forked from ole1986/traffic-control.sh
Traffic control script for incoming and outgoing packages using TC (on a specific ip address)
#!/bin/bash
VERSION="1.0.2"
# Interface connect to out lan
INTERFACE="eth0"
# Interface virtual for incomming traffic
VIRTUAL="ifb0"
# set the direction (1 = outgoing only, 2 = incoming only 3 = both)
DIRECTION=3
# Speed