Skip to content

Instantly share code, notes, and snippets.

View felipemarques's full-sized avatar

Felipe Marques felipemarques

View GitHub Profile
@felipemarques
felipemarques / 999.conf
Last active April 7, 2024 22:33
GPU Passthrough NVIDIA GTX 770 on Proxmox 7.4
balloon: 0
bios: ovmf
boot: order=scsi0;ide2;net0;ide0
cores: 6
cpu: host,hidden=1
efidisk0: local-lvm:vm-109-disk-0,efitype=4m,pre-enrolled-keys=1,size=4M
hostpci0: 0000:81:00,pcie=1,x-vga=on,romfile=GK104-patched.rom
ide0: local:iso/virtio-win-0.1.229.iso,media=cdrom,size=522284K
ide2: local:iso/HBCD_PE_x64.iso,media=cdrom,size=3026566K
machine: q35
@felipemarques
felipemarques / gist:77da19f5240afbdfe1a00fc6f2b33df3
Last active December 7, 2021 13:35
How to fix audio on ubuntu 18.04 in hyper-v
# based on https://www.elevenforum.com/t/how-to-get-sound-on-ubuntu-in-hyper-v.801/
# execute the following commands:
sudo apt-get install git libpulse-dev autoconf m4 intltool build-essential dpkg-dev libtool libsndfile-dev libspeexdsp-dev libudev-dev -y;
sudo cp /etc/apt/sources.list /etc/apt/sources.list~;
sudo sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list;
sudo apt-get update;

Rename a git tag old to new:

git tag new old
git tag -d old
git push origin :refs/tags/old
git push --tags

The colon in the push command removes the tag from the remote repository. If you don't do this, git will create the old tag on your machine when you pull.

-- source http://stackoverflow.com/a/5719854/695454

@felipemarques
felipemarques / REQUISITOS
Last active August 7, 2019 14:40
Avaliação Técnica - Vaga Analista Desenvolvedor Pleno
# Informacoes Gerais
- Criar um projeto em laravel na versão 5.6.39
- configurar o ambiente do projeto utilizando docker ( Dockerfile e docker-compose.yaml )
- utilizar a lib https://github.com/nWidart/laravel-modules/ versão 3.2.1
- sistema básico de login utilizando facebook como provider ( instalar lib laravel/socialite 3.0 )
- utilizar bootstrap ou qualquer outro template que utilize bootstrap 3
- versionar o projeto para um repositorio git remoto ( pode ser github, bitbucket, gitlab, ou ate mesmo um servidor git proprio )
# Sobre o database
<?php
class ApiRest
{
protected $apiAdminEndpoint;
/**
* @param $url
* @param array $headers
* @return mixed
server {
listen 80;
listen 443 ssl http2;
server_name mydomain.com.br;
root "/home/vagrant/www/mydomain.com.br/public";
index index.html index.htm index.php;
charset utf-8;
upstream dev-maker-api {
server 127.0.0.1:9000;
}
server {
listen 443;
client_max_body_size 100m;
server_name dev-maker-api.joox.io;
ssl on;
@felipemarques
felipemarques / dev-admin-api.joox.io.conf
Last active March 15, 2020 12:17
Joox Nginx Configuration
upstream dev-admin-api {
server 127.0.0.1:9000;
}
server {
listen 443;
client_max_body_size 100m;
server_name dev-admin-api.joox.io;
ssl on;
## 1) Requirements
* [nginx](https://www.nginx.com/)
* [php-fpm](http://php-fpm.org/)
* [php >= 5.5.x](http://php.net)
## 2) Install PHP & Nginx Environment on Ubuntu/Debian/Mint
```
$ sudo apt-get install nginx -y && /
@felipemarques
felipemarques / PasswordBroker.php
Last active July 2, 2016 23:51 — forked from jamesfairhurst/PasswordBroker.php
Laravel 5.2 Queue Password Reset Email
<?php
namespace App;
use Illuminate\Auth\Passwords\PasswordBroker as IlluminatePasswordBroker;
class PasswordBroker extends IlluminatePasswordBroker
{
/**
* Send the password reset link via e-mail in a queue