Skip to content

Instantly share code, notes, and snippets.

@fabriziomachado
fabriziomachado / azure-pipelines.yml
Created September 7, 2021 17:08 — forked from zanechua/azure-pipelines.yml
Azure Pipeline + Laravel + MySQL + PHPUnit + Laravel Dusk
# PHP
# Test and package your PHP project.
# Add steps that run tests, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/php
pool:
vmImage: 'Ubuntu 16.04'
variables:
phpVersion: 7.2
@fabriziomachado
fabriziomachado / tests.yml
Created December 17, 2019 11:37 — forked from rubenvanassche/tests.yml
A simple Laravel testing workflow for GitHub Actions
name: Tests (PHP)
on: [push]
jobs:
tests:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
@fabriziomachado
fabriziomachado / nginx.default.conf
Created June 1, 2018 21:56 — forked from sumardi/nginx.default.conf
Install PHP-FPM, Nginx & MySQL on EC2 with Amazon Linux AMI
# Install linux update, followed by GCC and Make
sudo yum -y update
sudo yum install -y gcc make
# Install Nginx and PHP-FPM
sudo yum install -y nginx php-fpm
# Install PHP extensions
sudo yum install -y php-devel php-mysql php-pdo \
php-pear php-mbstring php-cli php-odbc \
version: '2'
services:
nginx:
image: nginx
restart: always
hostname: loadbalancer
ports:
- "80:80"
- "443:443"
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Doctrine\ORM\Tools\Setup;
use Doctrine\ORM\EntityManager;
class DoctrineServiceProvider extends ServiceProvider
{
@fabriziomachado
fabriziomachado / referencia-pt.feature
Last active September 18, 2015 23:04 — forked from newtonwagner/referencia-pt.feature
Referência Behat Mink em Português
# Observacao: Ainda estou traduzindo e validando as opcoes para a linguagem pt.
# Dado (Given)
Dado Eu estou na página de entrada
Dado Eu estou em "url"
# Quando (When)
Hi
I hope this helps you all get started with phonegap and sqlite in your
application
Dean-O
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
# dchud's 20 minute guide to installing DSpace 4.0 from the binary release
# on a clean ubuntu 12.04 server running on aws ec2 or where-have-you
#
# this guide assumes you are already comfortable with *nix system administration
#
# this guide leaves out anything to do with the many details of configuring
# DSpace itself; it just gets you to the "it's up and running" step
#
# to start: get your clean ubuntu-12.04 system up to date
$ sudo apt-get update && sudo apt-get upgrade
<?php
class Arrays{
/**
* Sample $obj = Users::all();
* @param Object(Eloquent) $obj
* Key usage for assoc with value in the array $data
* @param string $key
* Value usage for fill array $data
* @param string $value
* Enable first element
@fabriziomachado
fabriziomachado / omniauth.rb
Created December 21, 2011 23:18 — forked from dira/omniauth.rb
OmniAuth strategy for a custom provider
# config/initializers/omniauth.rb
module OmniAuth
module Strategies
# tell OmniAuth to load our strategy
autoload :Pixelation, 'lib/pixelation_strategy'
end
end
Rails.application.config.middleware.use OmniAuth::Builder do
provider :twitter, "app_name", "secret"