Skip to content

Instantly share code, notes, and snippets.

View jessuppi's full-sized avatar
❤️
let the bodies hit the floor

Jesse Nickles jessuppi

❤️
let the bodies hit the floor
View GitHub Profile
@jessuppi
jessuppi / nginx-extras
Last active November 15, 2017 04:51
Replace Nginx with Nginx-Extras (Ubuntu 16.04)
#!/bin/bash
## remove nginx install (purge not needed) ##
DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' /usr/bin/apt-get -q --yes -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" remove nginx
## update repo cache ##
DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' /usr/bin/apt-get -q --yes -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" update
## ensure nginx mainline (dev) branch is default ##
DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' /usr/bin/apt-get -q --yes -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" add-apt-repository ppa:nginx/development
@jessuppi
jessuppi / install-monit
Last active October 15, 2017 09:27
Install Monit 5.23 (Ubuntu 16.04)
#!/bin/bash
###########################################
#### Install Monit 5.23 (Ubuntu 16.04) ####
###########################################
#### binaries list: https://mmonit.com/monit/dist/binary/
#### downloads: https://bitbucket.org/tildeslash/monit/downloads/
## install outdated repo version ##
@jessuppi
jessuppi / mysql_secure.sh
Created September 18, 2017 07:17 — 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
@jessuppi
jessuppi / readme.txt
Last active November 18, 2019 21:28
WordPress Plugin Example (readme.txt)
=== Plugin Name ===
Contributors: littlebizzy
Donate link: https://www.patreon.com/littlebizzy
Tags: five, keywords, separated, by, commas
Requires at least: 4.4
Tested up to: 4.9
Requires PHP: 7.2
Multisite support: No
Stable tag: 1.2.3
@tanchao90
tanchao90 / my.cnf
Last active November 30, 2019 21:36
mysql-5.7.19 customized config file
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
@davepullig
davepullig / gist:efddb9a894e0c4a824b4b61183cfb01c
Last active July 3, 2024 08:19
WP CLI search and replace URLs for WordPress multisite
wp search-replace --network --url=website.dev website.dev website.tld --precise --all-tables
@crittermike
crittermike / wget.sh
Last active March 28, 2025 18:44
Download an entire website with wget, along with assets.
# One liner
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com
# Explained
wget \
--recursive \ # Download the whole site.
--page-requisites \ # Get all assets/elements (CSS/JS/images).
--adjust-extension \ # Save files with .html on the end.
--span-hosts \ # Include necessary assets from offsite as well.
--convert-links \ # Update links to still work in the static version.
@stormwild
stormwild / composer-install.sh
Last active November 22, 2021 06:29
Composer install shell script
# php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
# php -r "if (hash_file('SHA384', 'composer-setup.php') === '669656bab3166a7aff8a7506b8cb2d1c292f042046c5a994c43155c0be6190fa0355160742ab2e1c88d40d5be660b410') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
# php composer-setup.php --install-dir=/usr/local/bin --filename=composer
# php -r "unlink('composer-setup.php');"
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '48e3236262b34d30969dca3c37281b3b4bbe3221bda826ac6a9a62d6444cdb0dcd0615698a5cbe587c3f0fe57a54d8f5') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php --install-dir=/usr/local/bin --filename=composer
php -r "unlink('composer-setup.php');"
@Auke1810
Auke1810 / wpa-clean-header.php
Last active February 25, 2025 22:05
create a clean wordpress header and remove unnecessary clutter.
<?php
/*
Plugin Name: wordpress assist clean header
Plugin URI: http://www.wordpressassist.nl/
Description: Remove shortlink hook
Version: 1.0
Author: AukeJomm
Author URI: http://www.aukejongbloed.nl
*/
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active April 12, 2025 06:26
Hyperlinks in Terminal Emulators