Skip to content

Instantly share code, notes, and snippets.

View paalwilliams's full-sized avatar
🎯
Focusing

Paal Williams paalwilliams

🎯
Focusing
View GitHub Profile
@paalwilliams
paalwilliams / gist:c5ecb2a86f83f2eaa861d7bff02cc7ef
Created February 18, 2021 05:02
Apache .htacces config for wordpress w/ react-router
# Redirect all requests for non-existent files and those not for wp-admin or wp-json
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/wp-admin
RewriteCond %{REQUEST_URI} !^/wp-json
RewriteRule ^ / [R=301,L]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
@paalwilliams
paalwilliams / instanceFactory.ts
Last active November 11, 2023 15:11
Strongly typed Class Instantiator Function Blueprint
class Animal {
public legs: number;
public fur: boolean;
public sound: string;
constructor(legs: number, fur: boolean, sound: string) {
this.legs = legs;
this.fur = fur;
this.sound = sound;
}