- Install ginfinity chrome extension to allow infinite scrolling through Google results
- Search for all indexed urls using query like site:example.com
- Scroll through all the results (hope there is not too much :)
- Once all results are shown, open Dev Tools JS console and run this command
(document.querySelectorAll('.g .r > a')).forEach(function(el) { console.log(el.href) });
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Postman Pre-Request script to append CSRF token in header for POST requests in Laravel | |
* Sanctum authenticated SPA. Requires active environment with {{url}} variable defined | |
* for main app domain. | |
* | |
* Postman Interceptor allows appending cookies from browser, but Laravel CSRF middleware | |
* only validates CSRF in headers or in _token form field, not in cookies. Axios automatically | |
* appends the CSRF from cookie to headers, but Postman cannot access intercepted cookies | |
* and use them, so we have to do one pre-request to get the CSRF token, store it | |
* in environment so it can be reused, and then append it to headers. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Disable XMLRPC | |
<Files xmlrpc.php> | |
Order Allow,Deny | |
Deny from all | |
</Files> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Script to migrate all data from storeview 1 to Default Scope (storeview 0) | |
@author - Jan Zikmund | |
*/ | |
$store_from = 1; | |
$store_to = 0; | |
$tables = array( | |
'catalog_product_entity_varchar', | |
'catalog_product_entity_text', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Redirect from non-www or http to https www | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
# exclude acme challenge urls from rewriting to not mess Let's Encrypt | |
RewriteRule ^\.well-known\/acme-challenge\/ - [L] | |
RewriteCond %{HTTP_HOST} !^www\. [NC,OR] | |
RewriteCond %{SERVER_PORT} 80 | |
RewriteRule ^(.*)$ https://www.jandhqualitykitchens.com.au/$1 [R=301,L] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Traits; | |
/** | |
* Allows saving models without triggering observers | |
*/ | |
trait SaveQuietly | |
{ | |
/** | |
* Save model without triggering observers on model |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Link sitemap in robots.txt | |
*/ | |
add_filter('robots_txt', function($robots) { | |
if(get_option( 'blog_public' )) { | |
// add sitemap link | |
$robots .= "\nSitemap: " . site_url() . "/sitemap_index.xml\n"; | |
} | |
return $robots; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Set the composite keys for a save update query. | |
* | |
* @param \Illuminate\Database\Eloquent\Builder $query | |
* @return \Illuminate\Database\Eloquent\Builder | |
*/ | |
protected function setKeysForSaveQuery(Builder $query) | |
{ | |
$query | |
->where('user_id', '=', $this->getAttribute('user_id')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// theme | |
add_action( 'wp_enqueue_scripts', function() { | |
if ( ! is_admin() ) { | |
$version = wp_get_theme()->get( 'Version' ); | |
wp_enqueue_style( 'child-theme', trailingslashit( get_stylesheet_directory_uri() ) . 'style.css', [], $version, 'all' ); | |
} | |
}); | |
// plugin | |
add_action( 'wp_enqueue_scripts', function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Logs output into wp-content/logs/asana-api-debug.log | |
*/ | |
protected function log($message) | |
{ | |
$line = '[' . date('Y-m-d H:i:s') . '] ' . $message . "\n"; | |
file_put_contents($this->logFile, $line, FILE_APPEND); | |
} | |
/** |
NewerOlder