Skip to content

Instantly share code, notes, and snippets.

@ai2ik
ai2ik / blueimp-gallery
Last active November 1, 2016 13:15
Working Gallery for Liz Jones Make-up
# macADMIN
Create a new Mac admin account by restarting the setup assistant
1. Boot into Single User Mode: `Command + S`
2. Mount the drive by typing `/sbin/mount -uw /` then `ENTER`
3. Remove the Apple Setup Done file by typing `rm /var/db/.AppleSetupDone` then `ENTER`
4. Reboot by typing `reboot` then `ENTER`
5. Complete the setup process, creating a new admin account.
# nano /etc/nginx/nginx.conf
# Start Abuse Agent Blocking
if ($http_user_agent ~* "^Mozilla.*Indy"){return 403;}
if ($http_user_agent ~* "^Mozilla.*NEWT"){return 403;}
if ($http_user_agent ~* "^$"){return 403;}
if ($http_user_agent ~* "^Maxthon$"){return 403;}
if ($http_user_agent ~* "^SeaMonkey$"){return 403;}
if ($http_user_agent ~* "^Acunetix"){return 403;}
if ($http_user_agent ~* "^binlar"){return 403;}
if ($http_user_agent ~* "^BlackWidow"){return 403;}
# Disallow execution, except for browser readable images
<FilesMatch "(^#.*#|\.(asp|bak|config|cxz|dist|exe|fla|htm|inc|ini|jsp|log|mso|php|pl|psd|py|sh|shtml|sql|sw[op]|txt)|~)$">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>
find /home/USERNAME/public_html -type f -ctime -1 -exec ls -ls {} \; | mail -E -s "File Changes, Past 24 Hours" me@my_domain.com
#
RewriteEngine on
# Start Abuse Agent Blocking
RewriteCond %{HTTP_USER_AGENT} "^Mozilla.*Indy" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "^Mozilla.*NEWT" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "^$" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "^Maxthon$" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "^SeaMonkey$" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "^Acunetix" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "^binlar" [NC,OR]
@ai2ik
ai2ik / EXIM
Last active April 6, 2017 14:29
# Get queue count
exim -bpc
# Display messages
exim -bp
# Display message headers
exim -Mvh <message-id>
# Display message body
newsmutiny.com
www.collective-evolution.com
realnewsrightnow.com
thedcgazette.com
addictinginfo.org
www.activistpost.com
www.duffelblog.com
70news.wordpress.com
naturalnews.com
www.coasttocoastam.com
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="/favicon.ico">
@ai2ik
ai2ik / functions.php
Created August 10, 2017 15:48
WP functions for Child theme
<?php
//* Code goes here
add_action('wp_enqueue_scripts', 'enqueue_child_theme_styles', PHP_INT_MAX);
function enqueue_child_theme_styles() {
wp_enqueue_style('parent-style', get_template_directory_uri() . '/style.css');
}
?>