#Create bitbucket branch
##Create local branch
$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
master
* sync
// match first <p><a><img class="size-large wp-image-[0-9]+"></a> | |
// special cases spotted in the wild: | |
// - content prepended by <p> </p>, we can take care of this one easy | |
// - misplaced wrappers eg <p> <a><img></a>blah blah blah<p>, well try to | |
handle this in the filter function | |
// - misc whitespace all over, lets get sloppy | |
// - no link wrapping the image, we'll try to handle this | |
// - some posts are stuck in the db without a class on the images, luckily it | |
should still be present in the rel on the wrapping anchor | |
// match guide: [0]match [1]p a? img /a? [2]a? [3]img [4]img.class |
Set WshShell = CreateObject("WScript.Shell") | |
WshShell.Run chr(34) & "C:\srv\apache24\startup.bat" & Chr(34), 0 | |
WshShell.Run chr(34) & "C:\srv\redis\quiet-start.bat" & Chr(34), 0 | |
WshShell.Run chr(34) & "C:\tmp\misc.bat" & Chr(34), 0 | |
Set WshShell = Nothing |
# Go to plugins/jetpack/jetpack.php into the folder of your WP local website. | |
# Find the line (276) below: | |
/** | |
* Is Jetpack active? | |
*/ | |
public static function is_active() { | |
return (bool) Jetpack_Data::get_access_token( JETPACK_MASTER_USER ); | |
} |
<?php | |
/** | |
* @package Frontend | |
*/ | |
if ( !defined('WPSEO_VERSION') ) { | |
header('HTTP/1.0 403 Forbidden'); | |
die; | |
} |
#Create bitbucket branch
##Create local branch
$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
master
* sync
<?php | |
// Confusion Matrix Init | |
$tp = 0; | |
$fp = 0; | |
$fn = 0; | |
$tn = 0; | |
$arrFP = array(); | |
$arrFN = array(); |
viewport_width = $(window).width() | |
ideal_height = parseInt($(window).height() / 2) | |
summed_width = photos.reduce ((sum, p) -> sum += p.get('aspect_ratio') * ideal_height), 0 | |
rows = Math.round(summed_width / viewport_width) | |
if rows < 1 | |
# (2a) Fallback to just standard size | |
photos.each (photo) -> photo.view.resize parseInt(ideal_height * photo.get('aspect_ratio')), ideal_height | |
else | |
# (2b) Distribute photos over rows using the aspect ratio as weight |
SCARF stands for status, certainty, autonomy, relatedness, and fairness. “Basically, when a person is honest with themselves, they’re most motivated by one of those qualities,” Stirman explains. “As a manager, you can figure out which one motivates which employee, and reward them accordingly. A lot of managers will look at their team and think, ‘We should do a round of compensation increases because everyone’s been working so hard,’ but this isn’t the best incentive for everyone.” Here’s how it looks: | |
Status-oriented employees can be motivated by a possible title change, or having their name attached to more important projects. | |
Certainty-oriented employees are motivated simply by the reassurance that their job is important and they are excelling. | |
Autonomy-oriented employees may need the ability to work from home, or simply slip on their head phones to tune everyone else out. | |
Relatedness-oriented employees are energized by opportunities to socialize with their coworkers – happy hours, softball games, etc. | |
Fai |
/** | |
* $.parseParams - parse query string paramaters into an object. | |
*/ | |
(function($) { | |
var re = /([^&=]+)=?([^&]*)/g; | |
var decodeRE = /\+/g; // Regex for replacing addition symbol with a space | |
var decode = function (str) {return decodeURIComponent( str.replace(decodeRE, " ") );}; | |
$.parseParams = function(query) { | |
var params = {}, e; | |
while ( e = re.exec(query) ) { |
<?php | |
/* | |
* Example code showing how to hook WordPress to add fields to the taxonomny term edit screen. | |
* | |
* This example is meant to show how, not to be a drop in example. | |
* | |
* This example was written in response to this question: | |
* | |
* http://lists.automattic.com/pipermail/wp-hackers/2010-August/033671.html | |
* |