Skip to content

Instantly share code, notes, and snippets.

View ludioao's full-sized avatar
🏠
Working from home

Lúdio Oliveira ludioao

🏠
Working from home
View GitHub Profile
@owenconti
owenconti / 10614453-afca-4647-9eda-c1f09aa26717.sh
Last active March 19, 2022 12:10
Replacing Laravel Mix with Vite
// Vue 2
npm install --save-dev vite vite-plugin-vue2 dotenv @vue/compiler-sfc
// Vue 3
npm install --save-dev vite @vitejs/plugin-vue dotenv @vue/compiler-sfc
@blakethepatton
blakethepatton / Description.md
Last active November 7, 2023 09:37
Getting Mailhog running on a dev server (nginx, letsencrypt, ssl, ubuntu)

Get it running as a service

wget https://github.com/mailhog/MailHog/releases/download/v1.0.0/MailHog_linux_amd64

mv MailHog_linux_amd64 mailhog

chmod +x mailhog

sudo vi /etc/systemd/system/mailhog.service

@callmeloureiro
callmeloureiro / comoSerChatoNoWhatsapp.js
Last active September 23, 2024 19:29
Como fazer alguém te responder no whatsapp
/*
Hoje iremos MUDAR a vida da pessoa que não te responde no whatsappp...
Que tal enviar mensagens pra ela até obter uma resposta?!
Sensacional não acha?! Mas, somos devs, correto?! Então vamos automatizar esse paranauê!
Para utilizar:
- Abra o web.whatsapp.com;
- Selecione a conversa que você quer;
- Abra o console e cole o código que está no gist;
@avataru
avataru / EloquentCheatSheet.md
Last active September 26, 2024 21:02
Eloquent relationships cheat sheet
@felipemarcos
felipemarcos / wp-cpf-login.php
Last active July 3, 2023 15:12
Permitir login por CPF - WordPress
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
/**
* Plugin Name: Login por CPF
* Description: Permite o usuário se logar utilizando o CPF.
* Author: Felipe Marcos
* Author URI: https://felipe.zip
* License: GNU General Public License v3 or later
anonymous
anonymous / app.dockerfile
Created January 2, 2017 11:02
FROM php:7.0.4-fpm
RUN apt-get update && apt-get install -y libmcrypt-dev \
mysql-client libmagickwand-dev --no-install-recommends \
&& pecl install imagick \
&& docker-php-ext-enable imagick \
&& docker-php-ext-install mcrypt pdo_mysql
@JacobBennett
JacobBennett / blog.md
Last active September 4, 2024 18:48
Clean up your Vue modules with ES6 Arrow Functions

Recently when refactoring a Vue 1.0 application, I utilized ES6 arrow functions to clean up the code and make things a bit more consistent before updating to Vue 2.0. Along the way I made a few mistakes and wanted to share the lessons I learned as well as offer a few conventions that I will be using in my Vue applications moving forward.

The best way to explain this is with an example so lets start there. I'm going to throw a rather large block of code at you here, but stick with me and we will move through it a piece at a time.

<script>

// require vue-resource...

new Vue({
@salizzar
salizzar / Manual de sobrevivência para fechar um aluguel em pouquíssimo tempo.markdown
Last active June 13, 2019 18:35
Um guia de dicas para fechar aluguel e organizar mudança em tempo recorde

Manual de sobrevivência para fechar um aluguel em pouquíssimo tempo

Bem, se tu estás lendo este guia provavelmente estás numa situação delicada. Separação, ordem de despejo, o que for; tens pouquíssimos dias para arranjar um lugar para morar. Baseado na minha experiência, resolvi montar este guia com dicas para auxiliar nesta procura e fechar um aluguel, bem como todos os preparativos para a mudança.

Primeiro de tudo, você terá de desenvolver algumas habilidades pessoais ESSENCIAIS tais como:

  • organização
  • boa apresentação
  • persuasão
  • assertividade
@wdullaer
wdullaer / install.sh
Last active October 9, 2024 19:47
Install Latest Docker and Docker-compose on Ubuntu
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
# Install kernel extra's to enable docker aufs support
# sudo apt-get -y install linux-image-extra-$(uname -r)
# Add Docker PPA and install latest version
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
@jentanbernardus
jentanbernardus / .htaccess
Created January 24, 2014 03:13
.htaccess Rules for Better Google Page Speed Results - Here's a set of default rules that I add to any site that I want to significantly increase the speed of. It took a lot of weeding through and testing, but this seems to work the best and will (guarantee not included) increase your Google Page Speed score by taking care of a lot of the cache …
# Turn on Expires and set default to 0
ExpiresActive On
ExpiresDefault A0
# Set up caching on media files for 1 year (forever?)
<FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$">
ExpiresDefault A29030400
Header append Cache-Control "public"
</FilesMatch>