Extracted from cytopia/devilbox#718 issue
- ~/.zshrc or ~/.bashrc
export IP=$(hostname -I)
- _~/.devilbox/.env
PROJECTS_PATH=~/code
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{HTTP_HOST} ^camunda\.test$ | |
RewriteRule ^wp-content/uploads/(.*)$ https://camunda.com/wp-content/uploads/$1 [NC,L] | |
</IfModule> |
class BulmaModal { | |
constructor(modalButton) { | |
const target = modalButton.dataset.target; | |
if (target) { | |
this.button = modalButton; | |
this.modal = document.querySelector(target); | |
this.html = document.querySelector("html"); | |
this.openEvent(); |
# Idea taken from https://gist.github.com/jackcarter/d86808449f0d95060a40 | |
import time | |
import codecs | |
import requests | |
reader = codecs.getreader("utf-8") | |
# Obtain your's by creating a Slack app on https://api.slack.com/apps?new_app=1 and assign that to your workspace. | |
# Within this new app, go to "OAuth & Permissions" and in the section "Scopes > User Token Scopes" add the "files:read" and "files:write" Oauth scopes. | |
# Finally, you can now go to the top of the page and install the app to the workspace. After that you'll get the User OAuth Token that you can use on the script. |
<?xml version="1.0"?> | |
<ruleset name="WordPress Theme Coding Standards" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd"> | |
<description>A custom set of rules to check for a WPized WordPress project</description> | |
<!-- General PHPCS config. --> | |
<file>.</file> | |
<arg value="sp"/> | |
<arg name="extensions" value="php"/> |
# .github/workflows/cron.yml | |
# You must add your YOUR_BUILD_HOOK from your repo > Settings > Secrets | |
name: Trigger Netlify Build | |
on: | |
schedule: | |
# Run at 0815 daily | |
- cron: '15 8 * * *' | |
jobs: | |
build: |
dvb-create-host() { | |
# Vars | |
BASE_DIR="~/www/$1/htdocs" | |
DB_NAME="$1_db" | |
DB_HOST="mysql" | |
DB_USER="root" | |
DB_PASS="" | |
WP_URL="$1.local" | |
WP_USER="ilan" |
Extracted from cytopia/devilbox#718 issue
export IP=$(hostname -I)
PROJECTS_PATH=~/code
<?php | |
if ( ! function_exists( 'lets_clear_cache' ) ) { | |
function lets_clear_cache() { | |
// WP Rocket | |
if ( function_exists( 'rocket_clean_domain' ) ) { | |
rocket_clean_domain(); | |
} | |
// W3 Total Cache : w3tc |
while read line; do awk '{print $2}' <(curl -ISs $line | grep location) >> headers.txt; done < urls.txt |