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
ob_start(); | |
var_dump($x); | |
$contents = ob_get_contents(); | |
ob_end_clean(); | |
error_log($contents); |
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
# Apache configuration file | |
# httpd.apache.org/docs/2.2/mod/quickreference.html | |
# Note .htaccess files are an overhead, this logic should be in your Apache config if possible | |
# httpd.apache.org/docs/2.2/howto/htaccess.html | |
# Techniques in here adapted from all over, including: | |
# Kroc Camen: camendesign.com/.htaccess | |
# perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/ | |
# Sample .htaccess file of CMS MODx: modxcms.com |
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
chore: add Oyster build script | |
docs: explain hat wobble | |
feat: add beta sequence | |
fix: remove broken confirmation message | |
refactor: share logic between 4d3d3d3 and flarhgunnstow | |
style: convert tabs to spaces | |
test: ensure Tayne retains clothing |
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 sys | |
import subprocess | |
import re | |
# REGULAR EXPRESSIONS | |
# (?=foo) Lookahead | |
# (?<=foo) Lookbehind | |
# (?!foo) Negative Lookahead | |
# (?<!foo) Negative Lookbehind |
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
# ------------------------------------------------------------ | |
# Many techniques here are taken from html5 boilerplate | |
# https://github.com/h5bp/html5-boilerplate/blob/master/.htaccess | |
# ------------------------------------------------------------ | |
# ------------------------------------------------------------ | |
# MANAGE UPDATES & SITE OFFLINE | |
# Update and uncomment these rules when we need to work on the site | |
# while serving an offline message to visitors. Add permitted IPs as needed. |
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 | |
DBUSER="root" | |
DBPASS="root" | |
DB="DB_NAME" | |
SCHEMAPATH="DBSchema" | |
/Applications/MAMP/Library/bin/mysqldump -u $DBUSER -p$DBPASS $DB > $SCHEMAPATH/$DB.sql | |
git add $SCHEMAPATH/$DB.sql | |
exit 0 |
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
# based on https://gist.github.com/salcode/9142815 | |
for I in $(/Applications/MAMP/Library/bin/mysql -u root -proot -e 'show databases' -s --skip-column-names); do /Applications/MAMP/Library/bin/mysqldump -u root -proot $I > "$I.sql"; 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
#!/bin/bash | |
############################################################## | |
# # | |
# Digital Ocean / Forge Recipe for CraftCMS websites # | |
# # | |
#============================================================# | |
# # | |
# Assumptions: # | |
# # | |
# - Ubuntu 16.04 Digital Ocean droplet, created by Forge # |
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
add_header Strict-Transport-Security "max-age=15768000; includeSubdomains; preload;"; | |
add_header Feature-Policy "midi none;notifications none;push none;microphone none;camera none;magnetometer none;gyroscope none;speaker self;vibrate none;fullscreen self;payment none;"; |
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
<?php | |
use craft\test\TestSetup; | |
ini_set('date.timezone', 'UTC'); | |
// Use the current installation of Craft | |
define('CRAFT_STORAGE_PATH', __DIR__ . '/_craft/storage'); | |
define('CRAFT_TEMPLATES_PATH', __DIR__ . '/_craft/templates'); | |
define('CRAFT_CONFIG_PATH', __DIR__ . '/_craft/config'); |
OlderNewer