Skip to content

Instantly share code, notes, and snippets.

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

Luítame de Oliveira Luitame

🏠
Working from home
  • X-Team
  • Brazil
  • 05:47 (UTC -03:00)
  • LinkedIn in/luitame
View GitHub Profile
@Luitame
Luitame / keychron_linux.md
Created July 1, 2022 13:58 — forked from andrebrait/keychron_linux.md
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work

Keychron Keyboards on Linux use the hid_apple driver (even in Windows/Android mode), both in Bluetooth and Wired modes. By default, this driver uses the F-keys as multimedia shortcuts and you have to press Fn + the key to get the usual F1 through F12 keys.

@Luitame
Luitame / Dockerfile
Created January 27, 2020 19:16
PHP com Rapadura
FROM php:7.3-fpm-alpine
# mysqli, pdo, pdo_mysql
RUN docker-php-ext-install mysqli pdo pdo_mysql
# git client, mysql-client
# zlib-dev zip
RUN apk update
RUN apk add gd php7-gd
RUN docker-php-ext-install sockets pdo_mysql
RUN apk add --no-cache libpng libpng-dev && docker-php-ext-install gd
@Luitame
Luitame / Produto.php
Last active February 7, 2018 15:18
Symfony 4 - repository problem
<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass="App\Repository\ProdutoRepository")
*/
@Luitame
Luitame / trait.php
Created July 27, 2017 19:18
My trait sample
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
trait ApiControllerTrait
{
/**
* Display a listing of the resource.
@Luitame
Luitame / README.md
Created June 6, 2017 19:15 — forked from chadrien/README.md
Debug PHP in Docker with PHPStorm and Xdebug

Debug your PHP in Docker with Intellij/PHPStorm and Xdebug

  1. For your local dev, create a Dockerfile that is based on your production image and simply install xdebug into it. Exemple:
FROM php:5

RUN yes | pecl install xdebug \
&amp;&amp; echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" &gt; /usr/local/etc/php/conf.d/xdebug.ini \
@Luitame
Luitame / install-docker-compose.txt
Created May 18, 2017 14:33
Install Docker Composer on Ubuntu
Make sure Docker is installed and you have proper root or sudo permissions.
Access your machine.
Install docker-compose through curl from dockers github:
-$ curl -L "https://github.com/docker/compose/releases/download/1.10.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
-curl command
-$ chmod +x /usr/local/bin/docker-compose
APP_ENV=local
APP_DEBUG=true
APP_KEY=base64:+j3je6C1ioep54a87fq55hLpf2tthcCVr+TxQ6mAty0=
APP_URL=http://localhost
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=abo
DB_USERNAME=homestead