Skip to content

Instantly share code, notes, and snippets.

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

Guilherme Vinicius guilhermevini

🏠
Working from home
View GitHub Profile
@guilhermevini
guilhermevini / subscribe.php
Created June 17, 2017 01:46
incrementa arquivo txt com e-mail vindo de um input
<?php
if(isset($_POST['email'])) {
$myfile = fopen("base.txt", "a") or die("Unable to open file!");
$txt = $_POST['email'] . "\n";
fwrite($myfile, $txt);
fclose($myfile);
}
?>
@guilhermevini
guilhermevini / bitbucket-pipelines.yml
Created January 30, 2017 13:56
Test Laravel application on bitbucket pipelines
image: smartapps/bitbucket-pipelines-php-mysql:stretch
pipelines:
default:
- step:
script:
- service mysql start
- mysql -h localhost --user=root --password=root -e "CREATE DATABASE tests;"
- composer install
- php -r "file_exists('.env') || copy('.env.tests', '.env');"