Skip to content

Instantly share code, notes, and snippets.

Avatar

Luan P. Coelho luanpcweb

View GitHub Profile
View kill-process.sh
while true; do pkill -9 kdevtmpfsi; sleep 60 ; done
@luanpcweb
luanpcweb / ubuntu_agnoster_install.md
Created Oct 20, 2020 — forked from renshuki/ubuntu_agnoster_install.md
Ubuntu 16.04 + Terminator + Oh My ZSH with Agnoster Theme
View ubuntu_agnoster_install.md

Install Terminator (shell)

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").

Install ZSH

@luanpcweb
luanpcweb / ignores.php
Created Oct 9, 2020 — forked from SmetDenis/ignores.php
Ignores for PHP inspections
View ignores.php
<?php
// https://pear.php.net/manual/en/package.php.php-codesniffer.advanced-usage.php
// @codingStandardsIgnoreLine
// @codingStandardsIgnoreFile
// @codingStandardsIgnoreStart
// @codingStandardsIgnoreEnd
// https://phpunit.de/manual/current/en/appendixes.annotations.html#appendixes.annotations.codeCoverageIgnore
// @codeCoverageIgnore
View install-raspios.sh
lsblk -p
sudo umount /dev/sdb1
sudo mkfs.vfat -I /dev/sdb
dd bs=4M if=2020-08-20-raspios-buster-armhf.img of=/dev/sdX conv=fsync
## OR
unzip -p 2020-08-20-raspios-buster-armhf.zip | sudo dd of=/dev/sdX bs=4M conv=fsync
@luanpcweb
luanpcweb / workbench-ui-fix.sh
Created Sep 11, 2020 — forked from AmreeshTyagi/workbench-ui-fix.sh
Exclude MySQL Workbench from dark theme with mojave Mac dark theme
View workbench-ui-fix.sh
#!/bin/bash
defaults write com.oracle.workbench.MySQLWorkbench NSRequiresAquaSystemAppearance -bool yes
echo "Successfully patched!"
echo "Now restart MySQL Workbench to see the Workbench in light theme."
#Restart MySQL Workbench after executing this.
View pwmLed.py
#Define Libraries
import RPi.GPIO as gpio
import time
gpio.setwarnings(False)
#Configuring GPIO
gpio.setmode(gpio.BOARD)
gpio.setup(38,gpio.OUT)
gpio.setup(40,gpio.OUT)
@luanpcweb
luanpcweb / mysql-docker.sh
Created Jun 2, 2020 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
View mysql-docker.sh
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
View duvidas-microblogging.md

Dúvidas

1 - Tipo fiz uma sequência aqui de mudanças no código, a lógica ficaria mais ou menos assim?

  • app/TweetPostRequest

    Faço as validações no campos que chegam da request. username e body. No username eu faço a validação se é requerido, se tem espaço e se começa com '@'. No body eu faço a validação se é requerido somente;

  • app/Http/Controllers/TweetController