View docker-composer.yml
version: '2' | |
# Named volumes | |
volumes: | |
# MySQL Data | |
wordpress-mysql-data: | |
driver: local | |
# Redis Data |
View BulmaWalker.php
<?php | |
namespace App\Lib; | |
use Utils; | |
class BulmaWalker extends \Walker_Nav_Menu | |
{ | |
private $cpt; // CPT, is current post a custom post type | |
private $archive; // Stores the archive page for current URL | |
public function __construct() |
View Add description to featured image
function new_post_thumbnail_meta_box() { | |
global $post; | |
echo '<p class="howto">Tamanho recomendado: 1413px × 640px </p>'; | |
$thumbnail_id = get_post_meta( $post->ID, '_thumbnail_id', true ); | |
echo _wp_post_thumbnail_html( $thumbnail_id ); | |
} | |
function render_new_post_thumbnail_meta_box() { | |
global $post_type; |
View center.css
display: -webkit-box; | |
display: -ms-flexbox; | |
display: -webkit-flex; | |
display: flex; | |
-webkit-box-pack: center; | |
-ms-flex-pack: center; | |
-webkit-justify-content: center; | |
justify-content: center; | |
-webkit-box-align: center; | |
-ms-flex-align: center; |
View style.scss
.column { | |
display: block; | |
flex-basis: 0; | |
flex-grow: 1; | |
flex-shrink: 1; | |
padding: 0.75rem; | |
} | |
.columns { | |
&.is-mobile > .column { |
View scroll.js
// SCROLL EVENT CAPTURE // | |
var wheel = document.getElementById('wheel'); | |
function report(ammout) { | |
clearTimeout(time); | |
if(ammout > 0){ | |
time = setTimeout(previousPage, 300); |
View money.js
Number.prototype.formatMoney = function (places, symbol, thousand, decimal) { | |
places = !isNaN(places = Math.abs(places)) ? places : 2; | |
symbol = symbol !== undefined ? symbol : "$"; | |
thousand = thousand || ","; | |
decimal = decimal || "."; | |
var number = this, | |
negative = number < 0 ? "-" : "", | |
i = parseInt(number = Math.abs(+number || 0).toFixed(places), 10) + "", | |
j = (j = i.length) > 3 ? j % 3 : 0; | |
return symbol + negative + (j ? i.substr(0, j) + thousand : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + thousand) + (places ? decimal + Math.abs(number - i).toFixed(places).slice(2) : ""); |
View .editorconfig
# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs | |
# editorconfig.org | |
root = true | |
[*] | |
indent_style = tab | |
indent_size = 4 | |
# We recommend you to keep these unchanged |
View valid-cpf.js
cfpValido () { | |
const regexCPF = /^\d{3}\.\d{3}\.\d{3}-\d{2}$/ | |
let i = 0 | |
let soma = 0 | |
let resto = 0 | |
if (regexCPF.test(this.cpf)) { | |
for (i = 1; i <= 9; i++) { | |
soma = soma + parseInt(this.cpf.substring(i - 1, i)) * (11 - i) | |
} | |
resto = soma % 11 |
View cpf.js
function gerarCPF(a) { | |
var b = !0 | |
, c = 9 | |
, d = randomiza(c) | |
, e = randomiza(c) | |
, f = randomiza(c) | |
, g = randomiza(c) | |
, h = randomiza(c) | |
, i = randomiza(c) | |
, j = randomiza(c) |
OlderNewer