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 / ExemploVhostLamppRewrite
Created July 13, 2015 18:48
Exemplo Vhost Lampp - rewrite
<VirtualHost *:80>
DocumentRoot "/home/usuario/vHost/silex-teste"
ServerName silex.localhost
ServerAlias www.silex.localhost
<Directory /home/usuario/vHost/silex-teste>
DirectoryIndex index.php
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
SET SQL_SAFE_UPDATES=0;
php -S localhost:3000 -t public
// Instalação
$ sudo add-apt-repository ppa:fossfreedom/byzanz
$ sudo apt-get update
$ sudo apt-get install byzanz
// Uso
byzanz-record -d 10 -c --x=0 --y=85 --width=700 --height=575 terminal.gif
git clone https://github.com/zfcampus/zf-apigility-skeleton.git
cd path/to/install
composer install
# or composer.phar install
php public/index.php development enable
# https://hub.docker.com/
docker pull php
docker run -d -v "$PWD":/var/www/html -p 8088:80 php:5.4-apache
docker images
docker images | wc -l #Conta a quantidade de imagens
@luanpcweb
luanpcweb / docker-compose.yml
Created September 19, 2016 18:50
Docker-compose blog post 298
php:
build: .
ports:
- "8080:80"
- "1443:443"
volumes:
- ./www:/var/www/html
links:
- db
db:
@luanpcweb
luanpcweb / index.php
Created September 19, 2016 18:53
Index para post 298 blog
<?php
mysqli_connect("db", "root", "bytes") or die(mysqli_error());
echo "Conectou!"
?>