Skip to content

Instantly share code, notes, and snippets.

View rafa-acioly's full-sized avatar
💭
-f

Rafael Acioly rafa-acioly

💭
-f
  • São Paulo - Brazil
View GitHub Profile
Crie o arquivo dentro de /etc/apache2/sites/available
-> vim mvc.conf // Este comando criara um arquivo com o nome mvc.conf
Dentro deste arquivo coloque o seguinte codigo
<VirtualHost *:80>
ServerName mvc.com.br // Nome da URL que voce quer usar
DocumentRoot /var/www/REST_MVC/public // Aponta a pasta onde estao os arquivos
<Directory /var/www/REST_MVC/public> // Aplica as regras para os arquivos que estao na pasta
DirectoryIndex index.php // Primeira pagina a ser executada
AllowOverride All //
<?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
$remetente = "contato@x.ws";
$destinatario = "contato@y.com.br";
<?php
/**
* Gera arquivos com dados para download
* @author Rafael Acioly
*/
class FileGenerator {
private static $controller;
private $file;
private $data = array();
<?php
/**
* Upload
*
* @author Rafael Acioly <aciolyr@gmail.com>
* @copyright 2016 Rafael Acioly
* @link http://www.github.com/rafa-acioly
* @version 1.0.0
*
use App\Content; // Model responsavel pelo gerenciamento de conteudo (datas)
private $content;
public function __construct(Content $content) {
$this->content = $content;
}
public function feed()
{
class RecipeController < ApplicationController
before_action :find_recipe, only: [:show, :update, :edit, :destroy]
def index
@recipes = Recipe.all
end
def new
@recipe = Recipe.new
end
<?php
function change_currency_symbol()
{
global $woocommerce;
return preg_replace('/[$]/', 'R$', $woocommerce->cart->get_cart_total());
}
apply_filter('woocommerce_cart_total', 'change_currency_symbol');
<?php
$raw = '{
"success": [
{"produto_id": 442},
{"produto_id": 443},
{"produto_id": 444},
{
"5": {
"ingredient_id": 5,
import Ember from 'ember';
import WoocommerceAPI from 'npm:woocommerce-api';
import sweetAlert from 'npm:sweetalert2';
export default Ember.Route.extend({
model () {
return this.store.createRecord('api-auth');
},
actions: {