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
#export | |
#export directly to a diff server | |
#ref: https://twitter.com/fideloper/status/1009781805581553665/photo/1 | |
mysqldump --single-transaction some_db \ | |
| gzip | ssh user@host "cat > some_db.sql.gz" | |
#export directly to S3 | |
mysqldump --single-transaction some_db | gzip | aws s3 cp - s3://some-bucket/some_db.sql.gz |
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 | |
/* | |
Description: A simple class based on a tutorial at WP.Tuts that creates an page with metaboxes. | |
Author: Stephen Harris | |
Author URI: http://www.stephenharris.info | |
*/ | |
/* Copyright 2011 Stephen Harris ([email protected]) | |
This program is free software; you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by |
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
AddType text/cache-manifest manifest | |
RewriteEngine On | |
# Put your installation directory here: | |
# If your URL is www.example.com/, use / | |
# If your URL is www.example.com/site_folder/, use /site_folder/ | |
RewriteBase / | |
# Do not enable rewriting for files or directories that exist |
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
# LESS compiler | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} ^(.*)\.css | |
RewriteCond %1.less -f | |
RewriteRule ^(.*)\.css lessphp/less.php?f=$1.less |
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 browser classes to body | |
var browser = []; | |
if (/mozilla/.test(navigator.userAgent.toLowerCase()) && !/webkit /.test(navigator.userAgent.toLowerCase())) | |
browser.push('mozila'); | |
if (/webkit/.test(navigator.userAgent.toLowerCase())) | |
browser.push('webkit'); | |
if (/opera/.test(navigator.userAgent.toLowerCase())) | |
browser.push('opera'); | |
if (/safari/.test(navigator.userAgent.toLowerCase())) | |
browser.push('safari'); |
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
<iframe width="640" height="390" | |
src="//www.youtube.com/embed/NT2vjByVhyw?list=PL4D692517BFF6D817&theme=light&autoplay=1&rel=0&modestbranding=1" | |
frameborder="0" > | |
</iframe> | |
Each YouTube video has 4 generated images. They are predictably formatted as follows: | |
http://img.youtube.com/vi/<insert-youtube-video-id-here>/0.jpg | |
http://img.youtube.com/vi/<insert-youtube-video-id-here>/1.jpg | |
http://img.youtube.com/vi/<insert-youtube-video-id-here>/2.jpg |
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
/** | |
Uploading files | |
Taken from: http://mikejolley.com/2012/12/using-the-new-wordpress-3-5-media-uploader-in-plugins/ | |
INSTRUCTIONS: | |
In the page you wish to use this script you'll need to enque the media scripts and this script. | |
Then create a input box and a button with NOTHING in between.. with the class 'upload_image_button' | |
<?php | |
wp_enqueue_media(); |
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
/*nice box shadow for buttons/inputs*/ | |
box-shadow: 0px 0px 1px 5px rgba(0,0,0,0.12); | |
/*sutle box shadow four sides for panels/tiles*/ | |
-moz-box-shadow: 0 0 8px -5px #606060; | |
-webkit-box-shadow: 0 0 8px -5px #606060; | |
box-shadow: 0 0 8px -5px #606060;*/ | |
/* big drop shadow two sides for panels */ | |
box-shadow: 3px 3px 5px 2px #CCCCCC |
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
/***** Selector Hacks ******/ | |
/***** | |
http://www.paulirish.com/2009/browser-specific-css-hacks/ | |
******/ | |
/* IE6 and below */ | |
* html #uno { color: red } | |
/* IE7 */ |
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
(function() { | |
var script, | |
scripts = document.getElementsByTagName('script')[0]; | |
function load(url) { | |
script = document.createElement('script'); | |
script.async = true; | |
script.src = url; | |
scripts.parentNode.insertBefore(script, scripts); |
OlderNewer