Skip to content

Instantly share code, notes, and snippets.

View 5udu3r's full-sized avatar

Sudo'er 5udu3r

  • Mars
View GitHub Profile
@5udu3r
5udu3r / bot.rb
Created September 9, 2020 03:53 — forked from dideler/bot.rb
Sending a notification message to Telegram using its HTTP API via cURL
# Use this script to test that your Telegram bot works.
#
# Install the dependency
#
# $ gem install telegram_bot
#
# Run the bot
#
# $ ruby bot.rb
#
server{
listen 82;
server_name adminer;
root /usr/share/apps/adminer;
location / {
index index.php; ## Allow a static html file to be shown first
try_files $uri $uri/ @handler; ## If missing pass the URI to Magento's front handler
expires 30d; ## Assume all files are cachable
server{
listen 82;
server_name adminer;
root /usr/share/adminer;
location / {
index index.html index.php; ## Allow a static html file to be shown first
try_files $uri $uri/ @handler; ## If missing pass the URI to Magento's front handler
expires 30d; ## Assume all files are cachable
}

How to Install Nginx with PHP and MySQL (LEMP Stack) on Ubuntu 20.04 LTS

Nginx (pronounced "engine x") is a free, open-source, high-performance HTTP server. Nginx is known for its high speed, stability, rich feature set, simple configuration, and low resource consumption. This tutorial shows how you can install Nginx on an Ubuntu 20.04 LTS server with PHP 7.4 support (through PHP-FPM) and MySQL support (LEMP = Linux + Nginx (pronounced "engine x") + MySQL + PHP).

Prerequisites
Ubuntu 20.04 LTS Server
@5udu3r
5udu3r / centos7-init.sh
Created August 17, 2020 06:57 — forked from ToyYan/centos7-init.sh
centos7 init
#设置时区
timedatectl set-timezone Asia/Shanghai
# 关闭SELinux
setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
# Fedora epel
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
@5udu3r
5udu3r / ubuntu-20.04-lts-perfect-setup.sh
Created August 17, 2020 06:56 — forked from eRQee/ubuntu-20.04-lts-perfect-setup.sh
Ubuntu 20.04 LTS Apps Server Installation Wizard
clear
##############
# Am I root? #
##############
if [ "x$(id -u)" != 'x0' ]; then
echo 'Error: this script can only be executed by root.'
echo 'Try re-run the script after switched to root account by type "sudo su"'
exit 1
fi
@5udu3r
5udu3r / WordPress.sh
Created August 17, 2020 06:53 — forked from lcherone/WordPress.sh
WordPress Installer
#!/bin/bash
# LXC.systems - Cloud Script - https://lxc.systems/cloud-script/MQCeGU1
#
# Title -------: WordPress Install
# Description -: This cloud script will install all base system packages, a LAMP server and the latest version of WordPress. It will work on any Ubuntu server from version 12.04 to 17.04.
# Created -----: June 17th 2017, 8:58pm
# Updated -----: June 21st 2017, 12:09am
# Usage ------: wget -O - https://lxc.systems/cloud-script/MQCeGU1 | sudo sh
# bash <(curl -s https://lxc.systems/cloud-script/MQCeGU1)
@5udu3r
5udu3r / _readme.md
Created August 17, 2020 06:50 — forked from riipandi/_readme.md
Personal Development Environment Setup

Personal Development Environment Setup

Don't forget to add %LOCALAPPDATA%\Yarn\bin to your PATH if you are using Yarn instead NPM.

# Composer Packages
composer config -g repos.packagist composer https://packagist.phpindonesia.id
composer global require hirak/prestissimo squizlabs/php_codesniffer laravel/installer

# Global NPM packages
@5udu3r
5udu3r / mysql_secure.sh
Created August 17, 2020 06:41 — forked from Mins/mysql_secure.sh
Automating mysql_secure_installation
#!/bin/bash
aptitude -y install expect
// Not required in actual script
MYSQL_ROOT_PASSWORD=abcd1234
SECURE_MYSQL=$(expect -c "
set timeout 10
@5udu3r
5udu3r / mysql-init.sh
Created August 17, 2020 06:36 — forked from leotm/mysql-init.sh
Setup MySQL
# Check process with: ps -ef | grep mysql OR ps aux|grep mysql
pkill mysqld
mysqld_safe --skip-grant-tables &
mysql -u root
FLUSH PRIVILEGES;
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('foobar');
quit
pkill mysql_safe
service mysql start
# now u good 2 go