PhpStorm Tips, ticks and standard setup
- Tips and Tracks for PHPStorm (PHPStorm Tips and Tricks.md)
- Standard setup for PHP projects (Standard.md)
1 AC_BR_BONANZA Too many newlines in a row... spammy template | |
2 ACCESSDB Message would have been caught by accessdb | |
3 ACCT_PHISHING_MANY Phishing for account information | |
4 AC_DIV_BONANZA Too many divs in a row... spammy template | |
5 AC_FROM_MANY_DOTS Multiple periods in From user name | |
6 AC_HTML_NONSENSE_TAGS Many consecutive multi-letter HTML tags, likely nonsense/spam | |
7 AC_POST_EXTRAS Suspicious URL | |
8 AC_SPAMMY_URI_PATTERNS10 link combos match highly spammy template | |
9 AC_SPAMMY_URI_PATTERNS11 link combos match highly spammy template | |
10 AC_SPAMMY_URI_PATTERNS12 link combos match highly spammy template |
// This will open up a prompt for text to send to a console session on digital ocean | |
// Useful for long passwords | |
(function () { | |
window.sendString = function (str) { | |
f(str.split("")); | |
function f(t) { | |
var character = t.shift(); | |
var i=[]; | |
var code = character.charCodeAt(); | |
var needs_shift = character.match(/[A-Z!@#$%^&*()_+{}:\"<>?~|]/); |
#!/usr/bin/env bash | |
# https://code.google.com/p/chromium/issues/detail?id=226801 | |
url='https://chromium.googlesource.com/chromium/src/net/+/master/http/transport_security_state_static.json?format=TEXT'; | |
curl -#s "${url}" | \ | |
base64 --decode | \ | |
sed '/^ *\/\// d' | \ | |
sed '/^\s*$/d' > hsts.json; |
<?php | |
// Based on <https://github.com/mecha-cms/x.minify> | |
namespace x\minify\_ { // start namespace | |
$n = __NAMESPACE__; | |
\define($n . "\\token_boolean", '\b(?:true|false)\b'); | |
\define($n . "\\token_number", '-?(?:(?:\d+)?\.)?\d+'); |
# Install dependencies | |
# | |
# * checkinstall: package the .deb | |
# * libpcre3, libpcre3-dev: required for HTTP rewrite module | |
# * zlib1g zlib1g-dbg zlib1g-dev: required for HTTP gzip module | |
apt-get install checkinstall libpcre3 libpcre3-dev zlib1g zlib1g-dbg zlib1g-dev && \ | |
mkdir -p ~/sources/ && \ | |
# Compile against OpenSSL to enable NPN |
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.