Skip to content

Instantly share code, notes, and snippets.

View cPLevey's full-sized avatar

David Levey cPLevey

  • cPanel, Inc.
  • Houston, TX
View GitHub Profile
@cPLevey
cPLevey / slowdown-upcp.hook
Created June 10, 2016 07:24
Site5 cPanel Update "Slowdown" Hook
#!/bin/bash
# Pre-upcp hook which will deny upcp in case the server already has IO,
# chef-client, cdp etc. are running..!
# Story: https://wwwhosting.atlassian.net/browse/SH-222
# Set limit load avg. for VPS/hardware
# Defaults to 6 for VPS and 10 for hardware ones
if [[ $(/sbin/lspci | wc -l) -eq 0 ]]; then
limit_load=6
@alzabo
alzabo / xmlrpc-distributed-brute-defense.conf
Last active October 9, 2020 09:51
WP/xmlrpc brute force ModSecurity rules
# These rules are designed to be effective versus /distributed/ brute force
# attacks. While they will function just as well against attacks which are
# /not distributed/ they will deny access to all XML-RPC method calls
# namespaced with the prefix "wp."
#
# An IP-based version of these rules may be more appropriate for sites which
# attacked from just a few distinct IP addresses.
#
# See http://alzabo.io/modsecurity/2014/09/15/wordpress-xml-rpc-brute-force.html
# for additional information
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 9, 2026 03:05
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname