Skip to content

Instantly share code, notes, and snippets.

<snippet>
<content><![CDATA[public function get${1/(.*)/\u$1/}()
{
return \$this->${1:$SELECTION};
}
public function set${1/(.*)/\u$1/}(\$$1)
{
return \$this->$1 = \$$1;
}
#!/bin/bash
echo "Script feito por: Matheus Loureiro"
echo "http://www.matheusloureiro.com.br"
WORKSPACE=~/workspace &&
TRECOS=$WORKSPACE/trecos
## Pasta Trecos
mkdir $WORKSPACE && mkdir $TRECOS
@luanpcweb
luanpcweb / comandos-docker
Created October 4, 2016 20:09 — forked from morvanabonin/comandos-docker
Comandos do Docker
Segue a lista de comandos docker e sua utilidade:
docker attach – Acessar dentro do container e trabalhar a partir dele.
docker build – A partir de instruções de um arquivo Dockerfile eu possa criar uma imagem.
docker commit – Cria uma imagem a partir de um container.
docker cp – Copia arquivos ou diretórios do container para o host.
docker create – Cria um novo container.
docker diff – Exibe as alterações feitas no filesystem do container.
docker events – Exibe os eventos do container em tempo real.
docker exec – Executa uma instrução dentro do container que está rodando sem precisar atachar nele.
@luanpcweb
luanpcweb / selenium-php-webdriver-cheatsheet.md
Created December 7, 2017 12:16 — forked from aczietlow/selenium-php-webdriver-cheatsheet.md
Cheat sheet for using php webdriver (facebook/webdriver).

Webdriver PHP API workthough

  • Open a browser

    # start an instance of firefox with selenium-webdriver
    
    $browser_type = 'firefox'
    $host = 'http://localhost:4444/wd/hub'
    

$capabilities = array(\WebDriverCapabilityType::BROWSER_NAME => $browser_type);

@luanpcweb
luanpcweb / centos7_template
Created August 29, 2019 14:11 — forked from ssh60/centos7_template
CentOS 7.2 VMware vSphere 6 template with guest customization working
## Download latest CentOS 7 x86_64 minimal iso image
## Good readings
# https://labs.vmware.com/vmtj/methodology-for-performance-analysis-of-vmware-vsphere-under-tier-1-applications
# https://labs.vmware.com/vmtj/virtualizing-latency-sensitive-applications-where-does-the-overhead-come-from
## Create typical CentOS VM
# compatible with 'ESXi 6.0 and later'
# set 'Guest OS Family' to 'Linux'
# set 'Guest OS Version' to 'CentOS 4/5/6/7 (64 bit)'
@luanpcweb
luanpcweb / mysql-docker.sh
Last active December 30, 2022 20:01 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# 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
pv $BACKUP | docker exec -i $CONTAINER /usr/bin/mysql -u $MARIA_DB_USER --password=$MARIA_DB_PASS $MARIA_DB_NAME
## PORTGRESS
@luanpcweb
luanpcweb / workbench-ui-fix.sh
Created September 11, 2020 18:21 — forked from AmreeshTyagi/workbench-ui-fix.sh
Exclude MySQL Workbench from dark theme with mojave Mac dark theme
#!/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.
@luanpcweb
luanpcweb / ignores.php
Created October 9, 2020 14:00 — forked from SmetDenis/ignores.php
Ignores for PHP inspections
<?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
@luanpcweb
luanpcweb / ubuntu_agnoster_install.md
Created October 20, 2020 12:49 — forked from renshuki/ubuntu_agnoster_install.md
Ubuntu 16.04 + Terminator + Oh My ZSH with Agnoster Theme

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