This file contains hidden or 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 | |
/** | |
* | |
* This script will copy your wordpress from public_html (or wherever) | |
* and place it in a staging folder. | |
* It will then clone the database, reconfigure the config file | |
* and replace URL's from the original URL to your staging URL. | |
* It will then make sure to NOT allow search engines to index the page. | |
* | |
* Use this script to clone your main wp in order to test maintenance work |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>ANSIBlackColor</key> | |
<data> | |
YnBsaXN0MDDUAQIDBAUGKSpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS | |
AAGGoKcHCBMXGyImVSRudWxs1QkKCwwNDg8QERJcTlNDb21wb25lbnRzVU5TUkdCXE5T | |
Q29sb3JTcGFjZV8QEk5TQ3VzdG9tQ29sb3JTcGFjZVYkY2xhc3NPECgwLjAyNzQ1MTAw | |
NjcgMC4yMTE3NjQ3MjMxIDAuMjU4ODIzNDg0MiAxTxAoMC4wMzkzODA3NDc4MiAwLjE2 |
This file contains hidden or 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
user web; | |
# One worker process per CPU core. | |
worker_processes 8; | |
# Also set | |
# /etc/security/limits.conf | |
# web soft nofile 65535 | |
# web hard nofile 65535 | |
# /etc/default/nginx |
Getting started: http://www.sqlteaching.com/
Related tutorial: http://cd64.de/mysql-cli
SQL joins infografic: http://cd64.de/sql-joins
This file contains hidden or 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
background: linear-gradient(334deg, #36967d, #36967d); | |
background-size: 400% 400%; | |
-webkit-animation: AnimationName 22s ease infinite; | |
-moz-animation: AnimationName 22s ease infinite; | |
-o-animation: AnimationName 22s ease infinite; | |
animation: AnimationName 22s ease infinite; | |
@-webkit-keyframes AnimationName { | |
0%{background-position:58% 0%} | |
50%{background-position:43% 100%} | |
100%{background-position:58% 0%} |
This file contains hidden or 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
var obj = object; | |
for (key in obj) { | |
console.log('val [' + key + ']\n\n ' + obj[key] + '\n\n'); | |
} | |
// if we only wanted the names of each key: | |
console.log(Object.keys(obj)); |
This file contains hidden or 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
# depends on ImageMagick (available via Homebrew) | |
# remove by color level (light watermarks) | |
mogrify -level '0%,75%,0.25' page.png | |
# remove by area (bottom of page) | |
mogrify -extent 3000x4000 -gravity North -fill white page.png |
This file contains hidden or 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
jQuery( document ).ready( function($) { | |
if ( $( "body" ).hasClass("wp-is-mobile"){ | |
/* Do javascript for mobile */ | |
} | |
else{ | |
/* Do javascript for non-mobile */ | |
} | |
}); |