Skip to content

Instantly share code, notes, and snippets.

@jennimckinnon
jennimckinnon / async.html
Created January 22, 2020 01:13
Basic async example for an article.
<script async src="/path/to/file/script.js">
</script>
add_filter( 'auth_cookie_expiration', 'keep_me_logged_in_for_1_year' );
function keep_me_logged_in_for_1_year( $expirein ) {
return YEAR_IN_SECONDS; // 1 year in seconds
}
@jennimckinnon
jennimckinnon / wp-config.php
Created November 23, 2019 06:05
For an article
define('WP_HOME','http://your-site.com);
define('WP_SITEURL','http://your-site.com);
set service Service-HTTP-1 -svrTimeout 500
* Hostname was NOT found in DNS cache
* Trying 123.45.6.789...
* Connected to 123.45.6.789 (123.45.6.789) port 80 (#0)
> GET /login HTTP/1.1
> User-Agent: Mozilla 5.0
> Accept: */*
> Host: your-site.com
>
* Empty reply from server
* Connection #0 to host 123.45.6.789 left intact
@jennimckinnon
jennimckinnon / Success header
Created October 11, 2019 05:00
For a KB article
* Hostname was NOT found in DNS cache
* Trying 123.45.6.789...
* Connected to 123.45.6.789 (123.45.6.789) port 80 (#0)
> GET /login HTTP/1.1
> User-Agent: Mozilla 5.0
> Accept: */*
> Host: your-site.com
>
< HTTP/1.1 200 OK
< Content-Type: text/html
@jennimckinnon
jennimckinnon / SSH
Created October 11, 2019 04:52
For a KB article
curl -vso /dev/null --user-agent "Mozilla 5.0" -H "Host: your-site.com" http://123.45.6.789/wp-login.php
@jennimckinnon
jennimckinnon / error.log
Created October 11, 2019 04:28
For a KB article
[Fri Oct 11 17:00:30 2019] [error] [client 123.4.56.7] error description: /path/to/file/with/error
@jennimckinnon
jennimckinnon / php.ini
Created September 30, 2019 23:34
For an article.
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.enable_cli=1
@jennimckinnon
jennimckinnon / Go to php.ini
Created September 30, 2019 23:33
For an article.
pecl config-get php_ini