In order to find this broken symbolic link I ran a command from the shell
find . -type l -exec sh -c "file -b {} | grep -q ^broken" \; -print
In order to find this broken symbolic link I ran a command from the shell
find . -type l -exec sh -c "file -b {} | grep -q ^broken" \; -print
Multi word search anywhere in a file:
(text1)[\s\S]*(text2)|\2[\s\S]*\1
Mulit word search on the same line in a file
^.*text1.+?text2
A Pen by Matt Johnson on CodePen.
SET @user_login := 'mjohnson'; | |
SET @user_pass := 'securePassword'; | |
SET @user_email := 'matt.johnson@classyllama.com'; | |
INSERT INTO `wp_users` | |
(`user_login`, `user_pass`, `user_email`, `user_registered`) | |
VALUES | |
(@user_login, MD5(@user_pass), @user_email, now()); | |
SELECT @user_id := LAST_INSERT_ID(); | |
INSERT INTO `wp_usermeta` | |
(`user_id`, `meta_key`, `meta_value`) |
stage.rb | |
set :branch, ENV['BRANCH'] || 'develop' | |
BRANCH=074e9eb--entire-commit-has-in-this-branch-variable--cab54fcc2fde8b bundle exec cap stage deploy |
# Setup local directory with braintree example and libraries | |
git clone git@github.com:braintree/braintree_php_example.git | |
cd braintree_php_example | |
composer install | |
# Create and define configuration options | |
echo ' | |
BT_ENVIRONMENT=sandbox | |
BT_MERCHANT_ID=xxxxxxxxxxxx | |
BT_PUBLIC_KEY=xxxxxxxxxxxx |
# CentoOS 7 - Systemctl | |
# https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units | |
# https://www.digitalocean.com/community/tutorials/understanding-systemd-units-and-unit-files | |
# Enabled user space units | |
/etc/systemd/system/multi-user.target.wants/varnish.service | |
# System library of available units | |
/usr/lib/systemd/system/varnish.service |
' replace mydomainnamehere.com | |
' replace db_name_here | |
use information_schema; | |
SET SESSION group_concat_max_len=10000000; | |
select | |
group_concat( | |
concat('UPDATE `',`table_name`,'` SET `',`column_name`,'` = REPLACE(`',`column_name`,'`, SUBSTRING(`',`column_name`,'`, LOCATE(''@'', `',`column_name`,'`)), CONCAT(''+'', SUBSTRING(MD5(SUBSTRING(`',`column_name`,'`, LOCATE(''@'', `',`column_name`,'`))) FROM 1 FOR 6), ''@example.com'')) WHERE `',`column_name`,'` NOT LIKE ''%@mydomainnamehere.com'';') SEPARATOR '\n\n') as q | |
from `columns` as c | |
where |
References:
https://gist.github.com/magnetikonline/11312172
https://easyengine.io/tutorials/nginx/tweaking-fastcgi-buffers/
Tweaking fastcgi-buffers
ACCESS_LOG="access.log"
# A really good fail-safe setup for destructive ansible playbooks | |
http://stackoverflow.com/questions/18195142/safely-limiting-ansible-playbooks-to-a-single-machine/18195217#18195217 |