Skip to content

Instantly share code, notes, and snippets.

@tjelen
tjelen / zerotier-ubuntu-gateway.md
Last active February 20, 2025 19:48
Zerotier: Setting up the default gateway in Ubuntu Linux

Zerotier Ubuntu config notes

Setting up the default gateway (for VPN tunelling)

Ubuntu 18.04 UFW settings, based on [1] Step 1

  • ens3 .. primary physical ETH interface
  • 10.243.0.0/16 .. ZT network
@0x4D31
0x4D31 / libssh_server_fingerprints.md
Last active September 17, 2024 00:33
[libssh server fingerprints] An analysis of Censys Public Scan 20180807 (only port 22) to estimate the number of servers {potentially} vulnerable to the recent Libssh bug #libssh #hassh
@rizkiheryandi
rizkiheryandi / wordpress_linux_permission_fix.sh
Last active November 2, 2018 16:24
Bash file for fix Wordpress permission in Linux
echo "---------------------------------------------------"
echo "Warning: Enter Your Wordpress path in proper format as Example shown below:"
echo "Example: var/www/html/wordpress/"
echo "---------------------------------------------------"
read path
echo "enter permission type d (default is 755)"
read perm1
echo "enter permission type f (default is 644)"
read perm2
sudo chown -R www-data:www-data ../../../../../../../../$path
@ankyit
ankyit / WordPress Performance.txt
Last active April 21, 2020 12:40
WordPress Performance
### Sites:
https://gtmetrix.com/
https://developers.google.com/speed/pagespeed/insights/
### Plugins
https://wordpress.org/plugins/query-monitor/
https://wordpress.org/plugins/autoptimize/
https://wordpress.org/plugins/wp-super-cache/
https://wordpress.org/plugins/ewww-image-optimizer/
https://wordpress.org/plugins/jetpack/
@mbodo
mbodo / kvm.md
Last active February 11, 2025 01:58
KVM Cheatsheet

QEMU/KVM Cheatsheet

Create KVM image with virt-build

cd /var/lib/libvirt/qemu/

sudo virt-builder fedora-26 \
--arch x86_64 \
--size 20G \
-m 8192 \
@nardhar
nardhar / wordpress-centos7.md
Last active September 6, 2017 13:49
wordpress CentOS 7

Install Wordpress on CentOS 7

Install LAMP

$ sudo yum install httpd mariadb mariadb-server php php-common php-mysql php-gd php-xml php-mbstring php-mcrypt php-xmlrpc unzip wget -y

Enable Apache and MariaDB as service

$ sudo systemctl start httpd

Networking Tools

netstat

  • -i interface config info (use ifconfig -a on Linux for verbose interface info)
  • -a all ports(listening and non-listening)
  • -l all listening ports
  • -t listening TCP ports
  • -p display PID and program names
  • -c it's like watch
  • -rn list routes but don't resolve ip
  • -n numeric ports
@bfocht
bfocht / wordpress-ubuntu.sh
Last active November 4, 2021 23:45
Install WordPress on ubuntu, PHP71 , apache, mysql, configure WordPress, wp-cli, phpUnit, WP Coding standards, letsencrypt
#!/bin/bash
#set your servername and email here
SERVERNAME=
EMAIL=
mkdir /wpinstall
cd /wpinstall
#generate password for mysql
## Pull in static configs
source ~/.bash_anchorhost
function wpengine_local_restore {
## Prompt for dynamic configs
read -p $'\e[31mWP Engine snapshot url\e[0m: ' wpengine_snapshot
read -p $'\e[31mLocal database name (will create)\e[0m: ' db_name
read -p $'\e[31mProduction site url ( ex: anchor.host )\e[0m: ' siteurl_production
read -p $'\e[31mLocal site url ( ex: anchor.dev )\e[0m: ' siteurl_local
@xhrix
xhrix / one-million-posts.md
Last active March 22, 2023 14:10
One Million Posts - Wordpress

One million posts

Let's create one million posts to see the performance of a Wordpress site.

Creation of a post

The purpose of this document is to find out what is the underlying data that gets modified in a wordpress database when a post with an image are created.

What I did