Skip to content

Instantly share code, notes, and snippets.

View arenadoon's full-sized avatar
✏️

Arena Artoon arenadoon

✏️
  • 08:34 (UTC +07:00)
View GitHub Profile
@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 / fa-link
Created March 29, 2024 21:30 — forked from Alecto/fa-link
Fontawesome link code
@arenadoon
arenadoon / speedtest-server-list.txt
Created February 28, 2024 17:00 — forked from stawidy/speedtest-server-list.txt
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)
@arenadoon
arenadoon / stream.php
Last active October 12, 2021 06:58 — forked from Bartvelp/stream.php
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
@arenadoon
arenadoon / allow
Created September 4, 2019 22:50 — forked from Nilpo/allow
CSF Allow AND Ignore Cloudflare IPv4 IP's.
for i in `curl https://www.cloudflare.com/ips-v4`; do csf -a $i; done
@arenadoon
arenadoon / sysctl.conf
Created August 24, 2019 16:20 — forked from sokratisg/sysctl.conf
Tuned sysctl.conf for use by CentOS/RHEL 6.x or later
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Turn on execshield
# 0 completely disables ExecShield and Address Space Layout Randomization
# 1 enables them ONLY if the application bits for these protections are set to “enable”
# 2 enables them by default, except if the application bits are set to “disable”
# 3 enables them always, whatever the application bits
@arenadoon
arenadoon / nginx.conf
Created August 24, 2019 14:03 — forked from v0lkan/nginx.conf
Configuring NGINX for Maximum Throughput Under High Concurrency
user web;
# One worker process per CPU core.
worker_processes 8;
# Also set
# /etc/security/limits.conf
# web soft nofile 65535
# web hard nofile 65535
# /etc/default/nginx
user www-data;
worker_processes 1; # set to number of cores
worker_priority 15; # be nice
# todo: put these on tmpfs, slow write logs to non-volatile
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
# set open fd limit to 81920
worker_rlimit_nofile 81920; # must be equal or higher as 'worker_processes' * 'worker_connections'
@arenadoon
arenadoon / gist:030dd273cfba8f66ad81ea60c9a9ef1f
Created August 22, 2019 12:50 — forked from Steven-Rose/gist:3943830
VI: Select all + delete, select all + copy
Select all and delete (actually move to buffer)
:%d
Select all and copy to buffer
:%y
Use p to paste the buffer.
@arenadoon
arenadoon / gist:820e70d8d2e6c90ea8263465e8d92e37
Created August 22, 2019 04:49 — forked from supairish/gist:748c85552b2f7047a36a
Whitelist request throttling in Nginx?
http {
map $whitelist $limit {
default $binary_remote_addr;
1 "";
}
limit_conn_zone $limit zone=conn_limit_per_ip:10m;
limit_req_zone $limit zone=req_limit_per_ip:10m rate=5r/s;
server {