Skip to content

Instantly share code, notes, and snippets.

@xserveraws
xserveraws / install.sh
Created July 29, 2020 22:14 — forked from janus57/install.sh
Images optimization
apt install jpegoptim pngquant optipng

Installation of bind9

apt install bind9

Create a virtual interface (eth0:1)

Note: i have the IP : 192.168.1.109 by DHCP

edit the network settings file

@xserveraws
xserveraws / create_debian-sys-maint_for_mysqladmin.sh
Created April 29, 2020 11:07 — forked from waja/create_debian-sys-maint_for_mysqladmin.sh
Create 'debian-sys-maint' MariaDB user for use of mysqladmin. Just in case you can't use 'root' via 'unix_socket' plugin.
#!/bin/sh
MYSQLADMIN_CFG="/etc/mysql/mariadb.conf.d/90-mysqladmin.cnf"
# generate password
PASS=$(perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..16)');
# adjust /etc/mysql/debian.cnf (used as defaults file by system scripts)
sed -i "s/^password =.*$/password = ${PASS}/" /etc/mysql/debian.cnf
sed -i "s/^user =.*$/user = debian-sys-maint/" /etc/mysql/debian.cnf
# create config file for mysqladmin itself (maybe not needed)
umask 066
cat > ${MYSQLADMIN_CFG} <<EOF
@xserveraws
xserveraws / default.prop
Created April 28, 2020 18:52
HOW TO: Modify boot.img to allow usb debugging from recovery adb
ro.secure=0
ro.allow.mock.location=1
ro.debuggable=1
persist.sys.usb.config=adb
ro.adb.secure=0
@xserveraws
xserveraws / innodb2myisam.sh
Created April 19, 2020 23:24 — forked from matriphe/innodb2myisam.sh
BASH script to convert InnoDB to MyISAM
#!/bin/bash
# MySQL info
DB_USER='your-db-user'
DB_PSWD='your-db-password'
DB_HOST='localhost'
# Backup path, no trailing slash!
BACKUP_PATH='/backup/sql/path'
@xserveraws
xserveraws / setup.md
Created April 11, 2020 11:05 — forked from foxlet/setup.md
macOS Installation Media Guide (Windows)

Download macOS

  1. Get FetchMacOS and place it in a known folder.

  2. Open Command Prompt and use cd to go to the known folder.

  3. Run fetch-macos.exe -p PRODUCTID -o SharedSupport where PRODUCTID is the macOS package you want to download.

Edit Downloaded Files

  1. Rename InstallESDDmg.pkg inside the SharedSupport folder to InstallESD.dmg
@xserveraws
xserveraws / gist-build-armian-using-docker-centos-rhel7.sh
Created February 26, 2020 20:05 — forked from rfrht/gist-build-armian-using-docker-centos-rhel7.sh
Building a Tinkerboard Armbian Kernel in a RHEL / CentOS 7 using Docker
=== CONSOLE FALLBACK: SERIAL PORT, SINCE NO HDMI SUPPORT IS PROVIDED IN THIS BUILD ===
Tinkerboard Kernel console serial port: UART2.
Using: Raspberry Pi as a console client. Disable local console so it can be used by minicom:
# systemctl mask serial-getty@ttyAMA0.service
==PINOUTS==
RASPI: PIN 6 (GND, GREEN), PIN 8 (TX, WHITE), PIN 10 (RX, BLUE)
TINKERBOARD: ====== Uses UART2 and NOT UART0!!!!!!!! ======
PIN30 (GND, GREEN), PIN 32 (TX, BLUE), PIN 33 (RX, WHITE)
@xserveraws
xserveraws / admin
Created January 8, 2020 22:55
Plesk Trial License Update Automation
A00M00-R0MZ05-YMNH13-15YM73-XMQB25
@xserveraws
xserveraws / README.md
Created November 24, 2019 04:03 — forked from yesidlazaro/README.md
Fix OpenGApps permissions on CyanogenMod 13

Fix OpenGApps permissions on CyanogenMod 13

Updating to CyanogenMod 13 with OpenGApps is problematic and results in issues including repeated warnings such as

Unfortunately, setup wizard has stopped working

Or

Unfortunately, Google Play Services has stopped working

@xserveraws
xserveraws / nginx-tuning.md
Created November 8, 2019 14:13 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.