Skip to content

Instantly share code, notes, and snippets.

View cre-mer's full-sized avatar
:atom:
Voll-Strack Developer

Jonas Merhej cre-mer

:atom:
Voll-Strack Developer
View GitHub Profile
@Horttcore
Horttcore / .htaccess
Last active June 26, 2020 09:52 — forked from stevegrunwell/.htaccess
Load production WordPress uploads in a local version of the site by putting this in a new Htaccess file in /wp-content/uploads/
# Attempt to load files from production if they're not in our local version (replace {SITE URL} with your production server)
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/wp-content/uploads/[^\/]*/.*$
RewriteRule ^(.*)$ https://{SITE URL}/$1 [QSA,L]
</IfModule>
@thatdevgirl
thatdevgirl / simple-autocomplete.js
Created November 29, 2018 15:29
Simple Autocomplete component for WP Gutenberg
/**
* A very simple autocomplete component
*
* This is to replace the OOTB Gutenberg Autocomplete component because it is
* currently broken as of v4.5.1.
*
* See Github issue: https://github.com/WordPress/gutenberg/issues/10542
*
* Note: The options array should be an array of objects containing labels and values; i.e.:
* [
@stevegrunwell
stevegrunwell / .htaccess
Created June 12, 2012 14:49
Load production WordPress uploads in a local version of the site by putting this in a new Htaccess file in /wp-content/uploads/
# Attempt to load files from production if they're not in our local version (replace {SITE URL} with your production server)
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*) http://{SITE URL}/wp-content/uploads/$1
</IfModule>