Skip to content

Instantly share code, notes, and snippets.

View sohag1192's full-sized avatar
🎯
Focusing

Md Sohag Rana sohag1192

🎯
Focusing
View GitHub Profile
@sohag1192
sohag1192 / check mobile user agent
Created March 25, 2024 06:45 — forked from dongerardor/check mobile user agent
Check if the user agent is a mobile one
var isMobile = {
Android: function() {
return navigator.userAgent.match(/Android/i);
},
BlackBerry: function() {
return navigator.userAgent.match(/BlackBerry/i);
},
iOS: function() {
return navigator.userAgent.match(/iPhone|iPad|iPod/i);
},
@sohag1192
sohag1192 / rtmp-log-clean.sh
Last active January 27, 2024 07:21
RTMP LOG CACHE DELETE CLEAN.SH
#!/bin/sh
echo "" > /usr/local/nginx/logs/rtmp_error.log
sleep 20
echo "" > /usr/local/nginx/logs/access.log
@sohag1192
sohag1192 / m3u8-to-mp4.md
Last active January 27, 2024 07:13 — forked from tzmartin/m3u8-to-mp4.md
m3u8 stream to mp4 using ffmpeg
@sohag1192
sohag1192 / clearRAM.sh
Created December 14, 2023 05:07 — forked from pklaus/clearRAM.sh
A Script to Clear Cached RAM on Linux
#!/bin/bash
## Bash Script to clear cached memory on (Ubuntu/Debian) Linux
## By Philipp Klaus
## see <http://blog.philippklaus.de/2011/02/clear-cached-memory-on-ubuntu/>
if [ "$(whoami)" != "root" ]
then
echo "You have to run this script as Superuser!"
exit 1
fi
@sohag1192
sohag1192 / DNS over TLS for unbound
Created October 11, 2023 13:03 — forked from BigSully/DNS over TLS for unbound
DNS over TLS configuration for unbound, including Google DNS, Cloudflare DNS and Quad9 DNS
server:
logfile: ""
# verbosity: 2
username: "nobody"
interface: 0.0.0.0
access-control: 0.0.0.0/0 allow
prefetch: yes
# include: "/opt/unbound/local.conf"
# include: "/opt/unbound/customize.conf"
@sohag1192
sohag1192 / clean.sh
Created August 17, 2023 06:40 — forked from Iman/clean.sh
Free up disk space on Ubuntu - clean log, cache, archive packages/apt archives, orphaned packages, old kernel and remove the trash
#!/bin/sh
#Check the Drive Space Used by Cached Files
du -sh /var/cache/apt/archives
#Clean all the log file
#for logs in `find /var/log -type f`; do > $logs; done
logs=`find /var/log -type f`
for i in $logs