Skip to content

Instantly share code, notes, and snippets.

Lucas Pires flyingluscas

Block or report user

Report or block flyingluscas

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
flyingluscas /
Last active Nov 20, 2019
Shell functions to run things like NPM, Composer and PHP using Docker.

Shell functions to run things using Docker.


Control the versions using environment variables, put this in your .bashrc or .zshrc.

flyingluscas /
Last active Nov 12, 2019
Utilizando Faker em pt-BR

Utilizando Faker em pt-BR

Acesse o seu arquivo app/Providers/AppServiceProvider.php, e no método register adicione o seguinte :

 * Register any application services.
 * @return void
flyingluscas /
Last active Nov 9, 2019
Formulários e MySQLi no PHP

MySQLi Exemplos

1. Conexão

Vamos criar um arquivo chamado connection.php, neste arquivo vamos abrir uma conexão com nosso banco de dados.

Dessa forma, quando precisarmos de uma conexão com o banco de dados para executar uma query, só precisamos incluir o arquivo connection.php.

$link = mysqli_connect('localhost', 'username', 'password', 'database_name') or die(mysqli_connect_error());
flyingluscas /
Last active Jul 25, 2019
Installing Popcorn Time on Ubuntu 16.x

1. Downloading

32 bits version

$ wget -O popcorntime.tar.xz

64 bits version

$ sudo add-apt-repository ppa:ondrej/php; sudo apt-get update
$ sudo apt-get install php7.1-cli -y
$ sudo apt-get install -y \
flyingluscas /
Last active Feb 26, 2019
My Ubuntu Theme Configurations

My Ubuntu Theme Settings

Install Theme

$ sudo add-apt-repository ppa:noobslab/themes
$ sudo apt-get update
$ sudo apt-get install flatabulous-theme

Install Icons Pack

View radix-sort.js
const unsortedArray = [123, 49, 7, 333]
const radix = (arr) => {
const max = Math.max(...arr).toString().length
const buckets = new Array(10)
let arrayWithLeftPaddedZeros = []
for (let i = 0; i < arr.length; i++) {
arrayWithLeftPaddedZeros[i] = arr[i].toString().padStart(max, '0')
flyingluscas / docker-compose.yml
Created May 14, 2017
CS 1.6 Server with Docker
View docker-compose.yml
version: '2'
image: jarlefosen/cs16
container_name: cs16_server
- 26900:26900/udp
- 27020:27020/udp
- 27015:27015/udp
View goCircleCIGo.js
setInterval(() => {
if (document.querySelector('.css-1jwka9i').innerText === 'FAILED' || document.querySelector('.css-1jwka9i').innerText === 'CANCELED') {
document.querySelector('#menu-1 button:first-child').click()
console.log('Job reloaded!')
}, 60000)
View goTravisGo.js
setInterval(() => document.querySelectorAll('.jobs-list li.failed .action-button--restart').forEach(button =>, 60000)
You can’t perform that action at this time.