A Pen by Jamie Warburton on CodePen.
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
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME}\.php -f | |
RewriteRule ^(.*)$ $1.php |
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
# Maintenance page | |
RewriteCond %{REMOTE_ADDR} !^000\.000\.000\.000 | |
RewriteCond %{REQUEST_URI} !^/maintenance\.php$ | |
# Allow a specific requ | |
RewriteCond %{REQUEST_URI} !^/company-logo.png$ [NC] | |
# Allow a series of filetypes | |
RewriteCond %{REQUEST_URI} !\.(css|jpe?g?|png|gif|woff|ttf) [NC] | |
RewriteRule ^(.*)$ https://www.domain.com/maintenance.php [R=307,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
RewriteEngine On | |
RewriteBase / | |
## Whitelisting + Maintenance | |
# Whitelist IPs to a single page, redirect all else | |
RewriteCond %{REMOTE_ADDR} !^000\.000\.000\.000 | |
RewriteCond %{REMOTE_ADDR} !^000\.000\.000\.000 | |
RewriteCond %{REQUEST_URI} ^/whitelist-me.php$ | |
RewriteRule ^(.*)$ https://domain.com [R=307,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
#!/bin/bash | |
# If user id not equal to root user id | |
if [[ $(id -u) -eq 0 ]]; then | |
echo "The command \"sphp\" should not be executed as root or via sudo directly." | |
echo "When a service requires root access, you will be prompted for a password as needed." | |
exit 1 | |
fi | |
# If no params are passed |
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
# Here we generate an SSL cert for zuma.local, add it to keychain and trust it. | |
# https://support.citrix.com/article/CTX135602 | |
# Steps: | |
# 1. Create a .cnf file for the config of our certificate. | |
# This is required to get the subjectAltName field, which Firefox and Chrome | |
# required to trust our cert. | |
# 2. Generate a key and a cert file using openssl | |
# 3. Add the cert to your ssl vhost (e.g. port :443) | |
# 4. Add the cert to your MacOS KeyChain, and set it to Always Trust |
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
// This is an example of how we can use the above two files to add a background image to the case | |
// study animation data | |
<template> | |
<lottie | |
:class="classes" | |
:height="height" | |
:options="options" | |
class="v-cs-image" | |
@animCreated="setupAnimation" |
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
#ls | cat -n | while read n f; do mv -n "$f" "FILENAME-$n.extension"; done | |
#e.g. | |
ls | cat -n | while read n f; do mv -n "$f" "rheinbacher-premium-beissbier-$n.jpg"; done |
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
import Vue from 'vue'; | |
/** | |
* This helper file is used to track analytics events to the correct platform. | |
* It is designed to track page views and events to Google Analytics. | |
* It then tracks conversions, registrations and leads to Facebook. | |
* Some events it may track to both GA and FB where applicable. | |
* | |
* It is recommended to just use the helper methods for tracking (e.g. trackBooking() ) | |
*/ |
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
<template> | |
<div> | |
<slot :trackButtonClick="trackButtonClick" /> | |
</div> | |
</template> | |
<script> | |
import { trackButtonClick } from '~/helpers/analytics'; | |
export default { |
OlderNewer