I hereby claim:
- I am majemedia on github.
- I am majemedia (https://keybase.io/majemedia) on keybase.
- I have a public key whose fingerprint is 902E 807B BAB1 2597 F0DC 4C52 8FBE 28CE 868F 7531
To claim this, I am signing this object:
ErrorDocument 503 /maintenance.html | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule .* /maintenance.html [R=503,L] |
<!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title>We're currently in maintenance</title> | |
<style> | |
#container { | |
width: 792px; | |
height: auto; | |
margin-left: auto; |
#!/bin/bash | |
username="WEBSERVERUSER" | |
adminuser="ADMINISTRATIVEUSER" | |
group="ADMINISTRATIVEGROUP" | |
sudo chown ${username}:${group} -R . | |
sudo find . -type d -exec chmod 570 {} \; | |
sudo find . -type f -exec chmod 470 {} \; | |
sudo chown ${adminuser}:${group} .permissions.sh |
#!/bin/bash | |
# Simple script to copy a MySQL to another | |
# Parent backup directory | |
backup_parent_dir="/path/to/tmp/backup/dir" #notice no ending slash | |
# MySQL settings | |
mysql_user="elevateduser" | |
mysql_password="elevateduserpassword" |
<?php | |
function is_paying_customer( $user_id ) { | |
$paying_customer = get_user_meta( $user_id, 'paying_customer', TRUE ); | |
if( ! $paying_customer ) { | |
return false; | |
} | |
else { | |
return true; |
$('img').on('click', function(event) { | |
var coordinates = get_click_coords(event); | |
}); | |
function get_click_coords(event) { | |
var pos_x = event.offsetX ? (event.offsetX) : event.pageX - document.getElementsByTagName("img").offsetLeft; | |
var pos_y = event.offsetY ? (event.offsetY) : event.pageY - document.getElementsByTagName("img").offsetTop; | |
var percentage_x = ( pos_x / event.target.clientWidth ) * 100; |
I hereby claim:
To claim this, I am signing this object:
SET @domains='domain1.com|domain2.com'; | |
UPDATE wp_users prod_users, | |
( select ID FROM wp_users WHERE user_email NOT REGEXP @domains) clone_users | |
SET prod_users.user_email = CONCAT('DC_', prod_users.ID, '@example.org') | |
WHERE prod_users.user_email NOT REGEXP @domains; |
/* | |
This query looks into post fields and returns an ordered list of results based on the attached categories to the posts searched. | |
This can be used to help weight results or to potentially show links to categories instead of the posts themselves. | |
Can be modified to add additional filters. Still not sure how to tie this into pre-get-posts but working on it. | |
+------------+---------+--------------+ | |
| name | term_id | result_count | | |
+------------+---------+--------------+ | |
| Category A | 15 | 12 | | |
| Category C | 17 | 12 | |
SELECT main.lead_id | |
FROM wp_rg_lead_detail as main | |
WHERE main.form_id = 1 | |
AND main.lead_id NOT IN ( | |
SELECT wp_rg_lead_detail.lead_id | |
FROM wp_rg_lead_detail | |
WHERE wp_rg_lead_detail.form_id = 1 | |
AND wp_rg_lead_detail.field_number = 102 | |
AND wp_rg_lead_detail.value <> '' | |
) |