We are using a simple git flow based on git flow and github flow. We have two branches develop and master.
develop is a representation of staging
master is a representation of production
server{ | |
listen 80; | |
server_name dropbox.urre.me | |
location / { | |
set $index index.html; | |
rewrite ^.*\/$ $fastcgi_script_name$index last; | |
proxy_pass https://dl.dropboxusercontent.com/u/XXXXXXX/; | |
proxy_redirect off; |
filter: | |
paths: | |
- 'lib/*' | |
- '/*' | |
excluded_paths: | |
- 'tests/*' | |
- 'examples/*' | |
tools: | |
php_mess_detector: | |
filter: |
<?php | |
/** | |
* Suppress errors generated by specified WordPress plugins. | |
* | |
* Include in the auto_prepend_file php.ini directive to ignore globally. | |
* | |
* @see http://plugins.trac.wordpress.org/browser/ostrichcize/tags/0.1/ostrichcize.php#L146 | |
* | |
* @param string $errno The error number. | |
* @param string $errstr The error message. |
<?php | |
/* | |
* Plugin Name: Feelings | |
* Plugin URI: trepmal.com | |
* Description: Add your feelings to your post | |
* Version: 0.1 | |
* Author: Kailey Lampert | |
* Author URI: kaileylampert.com | |
* License: GPLv2 or later | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html |
<?php | |
// Here we are, in any scope imaginable. It doesn't matter which | |
$my_object = new My_Class(); | |
add_filter( 'jpb.provider.my_class', function() use ( $my_object ) { | |
return $my_object || new My_Class(); | |
} ); | |
// This is in the global scope |
<?php | |
/** | |
* This little class records how long it takes each WordPress action or filter | |
* to execute which gives a good indicator of what hooks are being slow. | |
* You can then debug those hooks to see what hooked functions are causing problems. | |
* | |
* This class does NOT time the core WordPress code that is being run between hooks. | |
* You could use similar code to this that doesn't have an end processor to do that. | |
* |
/* Lets not rely on paths in the database, they can be very wrong when moving between dev/stage/live environments */ | |
/* The following two variables are backward to my thinking, but hey, what ya gonna do? */ | |
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . ''); // This is NOT the 'wordpress admin area' home, but the site's home | |
define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/SECRETDIRECTORY'); // This isn't the site's URL but the WordPress admin area URL | |
/* MySQL settings */ | |
switch($_SERVER['SERVER_NAME']){ | |
// Your local machine's settings | |
case 'mysite.local': | |
define('DB_NAME', 'dev_mysite'); |
TL;DR: I definitevely don't have anything against Bourbon, and we can actually use it with Compass (Bourbon for most CSS3 and Compass for utilities, spriting, compilation & other functions). But not using Compass is missing a big advantage Sass has over LESS.
chunky_png
gemgifify() { | |
if [[ -n "$1" ]]; then | |
if [[ $2 == '--good' ]]; then | |
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif | |
rm out-static*.png | |
else | |
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif | |
fi | |
else |