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_filter( 'wpmdb_rows_sql', 'remove_usc_attempts', 10, 2 ); | |
function remove_usc_attempts( $sql, $table ) { | |
global $wpdb; | |
if ( $table === $wpdb->options ) { | |
$sql = str_replace( 'ORDER BY', "`option_name` NOT 'wp_ultimate_security_checker_failed_login_attempts_log' ORDER BY", $sql ); | |
} | |
return $sql; | |
} |
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 | |
if ( ! class_exists( 'Mapa_Shortcode' ) ) : | |
/** | |
* Shortcode [mapa] | |
* | |
* Pega atributos através do place="lat,lng" | |
* | |
* Ex.: [mapa place="-26.2458151,-49.3858951"] | |
* Mostra o script e: <div id="map" class="map"></div> |
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 | |
/** | |
* All custom functions should be defined in this class | |
* and tied to WP hooks/filters w/in the constructor method | |
*/ | |
class Custom_Functions { | |
// Custom metaboxes and fields configuration |
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
prog pascoa | |
int dia, mes, ano, a, b, c, d, e, f, g, h, i, k, l, m; | |
imprima "Digite ano: "; | |
leia ano; | |
a <- ano%19; | |
b <- ano div 100; | |
c <- ano%100; | |
d <- b div 4; | |
e <- b%4; | |
f <- (b + 8) div 25; |
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
prog horarioverao | |
int inicio, fim, ano, s, dia, mes, a, b, c, d, e, f, g, h, i, k, l, m, x, dias; | |
logico bissexto; | |
bissexto <- falso; | |
imprima "Digite ano: "; | |
leia ano; | |
s <- ((ano - 1901) * 365 + (ano - 1901) div 4 + 274 + ((4 - ano % 4) div 4)) % 7; | |
inicio <- 21-s; | |
s <- ((ano - 1900) * 365 + (ano - 1900) div 4 + 32) % 7; | |
fim <- 21-s; |
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
#!/bin/bash | |
slug() { | |
slug="$1" | |
slug=${slug,,} | |
slug=${slug// /_} | |
slug=${slug//ó/o} | |
slug=${slug//ô/o} | |
slug=${slug//é/e} | |
slug=${slug//ú/u} |
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
#!/bin/bash | |
echo 'Temperatures in São Bento do Sul SC - Brazil' | |
CURL=$(curl -s http://www.samaesbs.sc.gov.br/) | |
NOW=$(echo $CURL | grep -oP 'temperatura\">\K([\d.]+)') | |
HIGH=$(echo $CURL | grep -oP '_max\">\K([\d.]+)') | |
LOW=$(echo $CURL | grep -oP '_min\">\K([\d.]+)') | |
echo " Now $NOWºC" |
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 | |
declare(strict_types=1); | |
/** | |
* Interface to JSON endpoint. | |
*/ | |
namespace GilbertoTavares; | |
/** | |
* Class to GET JSON and print. |
OlderNewer