Skip to content

Instantly share code, notes, and snippets.

Avatar
:atom:
Full-St(r)ack developer

Jonas Merhej cre-mer

:atom:
Full-St(r)ack developer
View GitHub Profile
@Horttcore
Horttcore / .htaccess
Last active Jun 26, 2020 — 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/
View .htaccess
# 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 Nov 29, 2018
Simple Autocomplete component for WP Gutenberg
View simple-autocomplete.js
/**
* 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 Jun 12, 2012
Load production WordPress uploads in a local version of the site by putting this in a new Htaccess file in /wp-content/uploads/
View .htaccess
# 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>