Esse exemplo mostra todos os arquivos alterados nos últimos dois dias, sem repetir:
git log --pretty=format: --name-only --since="2 days ago" | sort | uniq
git rev-list --all --objects | \ | |
sed -n $(git rev-list --objects --all | \ | |
cut -f1 -d' ' | \ | |
git cat-file --batch-check | \ | |
grep blob | \ | |
sort -n -k 3 | \ | |
tail -n40 | \ | |
while read hash type size; do | |
echo -n "-e s/$hash/$size/p "; | |
done) | \ |
<?php | |
/* | |
* This scripts changes all occurrences of a URL in your WordPress database. | |
* | |
* It will compare the $newUrl against the URL saved on you wp_options table (site_url), or in the domain column of the wp_sites table for a Multi Site installation. | |
* | |
* It will handle serialized data and Objects stored in the database. | |
* | |
* | |
*/ |
ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/sublime |
<?php | |
/** | |
* Get all terms of $tax_to taxonomy that posts in $term_from of $tax_from have. | |
* | |
* @param string $tax_from taxonomy name | |
* @param string $term_from term slug | |
* @param string $tax_to taxonomy name | |
* |
DELETE pm | |
FROM wp_postmeta pm | |
LEFT JOIN wp_posts wp ON wp.ID = pm.post_id | |
WHERE wp.ID IS NULL |
function lower_wpseo_priority( $html ) | |
{ | |
return 'low'; | |
} | |
add_filter( 'wpseo_metabox_prio', 'lower_wpseo_priority' ); |
function save_post_representante() { | |
...... | |
$representante = get_post($clientes[$cliente]); | |
$erro = 'O cliente "<strong> '. $representante->post_title. '</strong> " já está cadastrado para o representante "'. $post->post_title.'" '; | |
} set_transient( get_current_user_id().'missingfield', $erro ); | |
function representante_validacao() { | |
if($out = get_transient( get_current_user_id().'missingfield' ) ) { | |
delete_transient( get_current_user_id().'missingfield' ); |
// Change ids to int. | |
foreach ($clientes as $key => $value) { | |
$clientes[$key] = (int) $value; | |
} | |
$args = array( | |
'post_type' => 'clientes', | |
'post_status' => 'publish', |
white-space: nowrap; | |
overflow: hidden; | |
text-overflow: ellipsis; |