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
class Post extends Model { | |
protected static function boot() { | |
parent::boot(); | |
self::observe(NomeDoObserver::class); | |
} | |
} |
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 | |
$cpf = '123.158.124-22'; | |
$cpf = preg_replace("/[^0-9]/", "", $cpf); | |
echo($cpf); // Resultado: 12315812422 |
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
{ $value or "default" } |
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
function dateToBr(date) { | |
let splited = date.split('T') | |
let splitedDate = splited[0].split('-').reverse().join('/') | |
let hour = splited[1] | |
return `${splitedDate} ${hour}` | |
} | |
console.log(dateToBr('2021-10-21T05:51:03')) |
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
# Remove apps if not will use | |
k3b, konversation, thunderbird | |
# Add sudo password | |
sudo passwd root | |
# Set the fastest mirror | |
sudo pacman-mirrors --fasttrack |
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
"scripts": { | |
"postinstall": "npm run postinstall:electron && npx electron-builder install-app-deps", | |
"postinstall:web": "node postinstall-web", | |
"postinstall:electron": "node postinstall", | |
"ng": "ng", | |
"start": "npm run postinstall:electron && npm-run-all -p ng:serve electron:serve", | |
"build": "node clean && npm run postinstall:electron && npm run electron:tsc && ng build", | |
"build:dev": "npm run build -- -c dev", | |
"build:prod": "npm run build -- -c production", | |
"ng:serve": "ng serve", |
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
(function($) { | |
$(window).load(function () { | |
// retrieved this line of code from http://dimsemenov.com/plugins/magnific-popup/documentation.html#api | |
$.magnificPopup.open({ | |
items: { | |
src: 'https://www.youtube.com/watch?v=7eo8XpT4CmM' | |
}, | |
type: 'iframe', | |
iframe: { | |
markup: '<div class="mfp-iframe-scaler">'+ |
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
var pjson = require('./package.json'); | |
console.log(pjson.version); |
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
FROM php:7.2-fpm | |
# Copy composer.lock and composer.json | |
COPY composer.lock composer.json /var/www/ | |
# Set working directory | |
WORKDIR /var/www | |
# Install dependencies | |
RUN apt-get update && apt-get install -y \ |
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
########## Install NGINX ############## | |
# Install software-properties-common package to give us add-apt-repository package | |
sudo apt-get install -y software-properties-common | |
# Install latest nginx version from community maintained ppa | |
sudo add-apt-repository ppa:nginx/stable | |
# Update packages after adding ppa |
NewerOlder