Skip to content

Instantly share code, notes, and snippets.

@yhchiu
yhchiu / COMPILE PHP 8.0 RHEL (CentOS?) 6
Created March 26, 2024 09:27 — forked from latuminggi/COMPILE PHP 8.0 RHEL (CentOS?) 6
COMPILE PHP 8.0 RHEL/(CentOS?) 6
### COMPILE PHP 8.0 RHEL/(CentOS?) 6 ###
# You can find PHP 8.0 repository here:
# https://pkgs.dyn.su/el6-extras/x86_64
# installing dependencies
# https://coderwall.com/p/ggmpfa/php-configuration-error-and-solutions-in-rpm
yum install -y autoconf autotools gmp-devel libcurl-devel postgresql postgresql-devel sqlite sqlite-devel \
libxslt-devel net-snmp-devel readline-devel aspell aspell-devel unixODBC-devel libicu-devel libc-client-devel \
freetype-devel libXpm-devel libpng-devel libvpx-devel enchant-devel libmcrypt-devel libmemcached-devel \
@yhchiu
yhchiu / check_for_hack_directadmin_shell
Created January 5, 2024 13:57 — forked from parsibox/check_for_hack_directadmin_shell
check for shell script in directadmin vps ( hack , find , directadmin )
grep -lr --include=*.php "eval(base64_decode" /home
find /home -type f -name '*.php' | xargs grep -l "eval *(" --color
find /home -type f -name '*.php' | xargs grep -l "base64_decode *(" --color
find /home -type f -name '*.php' | xargs grep -l "gzinflate *(" --color
find /home -type f -name '*.php' | xargs grep -l "outdo" --color
find /home -type f -name '*.php' | xargs grep -l "eval*_POST" --color
find /home -type f -name '*.php' | xargs grep -l "$ptzrw" --color
find /home/*/domains/*/public_html/wp-content/uploads -type f -name '*.php'
find /home/ -type d -perm 777 -exec find {} -name "*.php" \;

Python Socket 编程详细介绍

Python 提供了两个基本的 socket 模块:

  • Socket 它提供了标准的BSD Socket API。
  • SocketServer 它提供了服务器重心,可以简化网络服务器的开发。

下面讲解下 Socket模块功能。

Socket 类型

@yhchiu
yhchiu / m3u8-to-mp4.md
Created January 27, 2023 07:22 — forked from tzmartin/m3u8-to-mp4.md
m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
@yhchiu
yhchiu / check-ssl-expire.py
Created September 29, 2020 05:37 — forked from crashdump/check-ssl-expire.py
Report how many days before and http ssl certificate expire. I've also provided a template if you want to use it with Zabbix as an External Check: - Configure ExternalScripts variable in zabbix_server.conf - Put the script in the external script folder (I've used /etc/zabbix/externalscripts/) - Import the template & assign it to your host. - Wat…
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = "Adrien Pujol - http://www.crashdump.fr/"
__copyright__ = "Copyright 2013, Adrien Pujol"
__license__ = "Mozilla Public License"
__version__ = "0.3"
__email__ = "[email protected]"
__status__ = "Development"
__doc__ = "Check a TLS certificate validity."

some tools for diagrams in software documentation

Diagrams For Documentation

Obvious Choices

ASCII

@yhchiu
yhchiu / 0. nginx_setup.sh
Created April 28, 2016 07:31 — forked from mikhailov/0. nginx_setup.sh
Nginx + secure pseudo-streaming
# Nginx can serve FLV/MP4 files by pseudo-streaming way without any specific media-server software.
# To do the custom build we use 2 modules: --with-http_secure_link_module --with-http_flv_module
# This module "secure-link" helps you to protect links from stealing away.
#
# NOTE: see more details at coderwall: http://coderwall.com/p/3hksyg
cd /usr/src
wget http://nginx.org/download/nginx-1.5.13.tar.gz
tar xzvf ./nginx-1.5.13.tar.gz && rm -f ./nginx-1.5.13.tar.gz