Skip to content

Instantly share code, notes, and snippets.

View lucasprogamer's full-sized avatar
🕶️
Working on Code

Lucas lucasprogamer

🕶️
Working on Code
View GitHub Profile
@lucasprogamer
lucasprogamer / .editorconfig
Created April 16, 2020 19:46
my .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
@lucasprogamer
lucasprogamer / money.js
Created April 8, 2020 20:04
Prototype para money
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) : "");
// SCROLL EVENT CAPTURE //
var wheel = document.getElementById('wheel');
function report(ammout) {
clearTimeout(time);
if(ammout > 0){
time = setTimeout(previousPage, 300);
@lucasprogamer
lucasprogamer / style.scss
Created March 27, 2019 20:45
Bulma SCSS columns
.column {
display: block;
flex-basis: 0;
flex-grow: 1;
flex-shrink: 1;
padding: 0.75rem;
}
.columns {
&.is-mobile > .column {
@lucasprogamer
lucasprogamer / center.css
Last active March 26, 2019 16:48
Center Element vertical and Horizontal
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;
<?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()
version: '2'
# Named volumes
volumes:
# MySQL Data
wordpress-mysql-data:
driver: local
# Redis Data
@lucasprogamer
lucasprogamer / php.mdown
Created June 25, 2018 15:10
malformed header from script. Bad header=&lt;br /&gt;: index.php

this error happens because exists tags from olds version of PHP

check if exists in php.ini and remove or comment allow_call_time_pass_reference

check if exist any tag unable in php 7.1 like

;asp_tags = Off ;register_globals = Off

bower_components/*
node_modules/*
@lucasprogamer
lucasprogamer / set-robot-git-ftp.md
Created June 22, 2018 18:58
git ftp no setrobot

.git-ftp-ignore | Conteúdo abaixo

bower_components/* node_modules/*

.git-ftp-include | Conteúdo abaixo

vendor/:composer.lock

Dentro da pasta .git, checar arquivo config