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 | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
# | |
WP_OWNER=www-data # <-- wordpress owner | |
WP_GROUP=www-data # <-- wordpress group | |
WP_ROOT=$1 # <-- wordpress root directory |
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 | |
# Path to the Git user file | |
GIT_USERS_FILE=~/.gitusers | |
# Check if Git is installed | |
if ! command -v git &>/dev/null; then | |
echo "Git is not installed on this machine" | |
exit | |
fi |
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
document.querySelectorAll('.wpml-translation-setup-table input[type="radio"][value="3"]').forEach(input => { input.checked = true; }); |
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
# BASH Configuration and Aliases | |
# source: http://natelandau.com/my-mac-osx-bash_profile/ | |
# source: https://github.com/mathiasbynens/dotfiles | |
# Sections: | |
# 0. Execute Only Once (if you want) | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching |
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
# BEGIN MAINTENANCE MODE | |
# ADD your IP address to gain access. Local IPS for local testing | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REMOTE_ADDR} !^192\.168\.0\.0 | |
RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1 | |
RewriteCond %{DOCUMENT_ROOT}/maintenance.html -f | |
RewriteCond %{DOCUMENT_ROOT}/maintenance.enable -f | |
RewriteCond %{SCRIPT_FILENAME} !maintenance.html | |
RewriteRule ^.*$ /maintenance.html [R=503,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
/** | |
* @example | |
*.try { | |
* const result = await retry((attempt) => { | |
* if ( Math.ceil(Math.random() >= .5) ) { | |
* return 'ok'; | |
* } | |
* | |
*. console.log('-> nope'); | |
* throw new Error('Failed after ' + attempt + ' tries'); |
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
/** | |
* @example | |
* const item = watch({}, (value, prop, source) => { | |
* if (prop === 'foo' && !value) { | |
* return 'default_value'; | |
* } | |
* | |
* if (prop === 'baz') { | |
* return 'nope'; | |
* } |
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 debounce from 'lodash.debounce'; | |
/** | |
* @example | |
* import { reactive, watch } from './reactivity'; | |
* | |
* const r1 = reactive({ isReady: false }) | |
* const r2 = reactive({ x: 1 }) | |
* | |
* setTimeout(() => { |
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
/** | |
* Copy properties from source to target. | |
* @param target | |
* @param source | |
*/ | |
function copyProps(target, source) { | |
const properties = Object.getOwnPropertyNames(source); | |
properties | |
.concat(Object.getOwnPropertySymbols(source)) |
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
const fs = require('fs'); | |
const colors = require('tailwindcss/colors'); | |
const themeJson = JSON.parse(fs.readFileSync('./theme.json')); | |
module.exports = { | |
theme: { | |
extend: { | |
colors: useThemeJSONWith({ | |
// brand | |
primary: colors.purple, |
NewerOlder