Skip to content

Instantly share code, notes, and snippets.

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

Erik Figueiredo erikfig

🏠
Working from home
View GitHub Profile
import axios from 'axios'
// export default ({ Vue }) => {
// Vue.prototype.$axios = axios
// }
export default ({ Vue }) => {
Vue.prototype.$axios = axios.create({
baseURL: 'http://localhost:8765/',
withCredentials: true,
<?php
namespace App\Controller\Api\V1;
use Cake\Controller\Controller;
class AppController extends Controller
{
// public $components = [
// 'Acl' => [
// 'className' => 'Acl.Acl'
// ]
// ];
@erikfig
erikfig / ghUpdate.bash
Created May 11, 2018 21:46 — forked from mhartington/ghUpdate.bash
Alias to update a forked repo with the original. One for zsh and one for bash
#!/usr/bin/env bash
function ghUpdate() {
read -p "Whats the URl of the original repo? | " answer
# Add the remote, call it "upstream":
echo $answer
git remote add upstream $answer
# Fetch all the branches of that remote into remote-tracking branches,
# such as upstream/master:
@erikfig
erikfig / teste
Last active September 22, 2016 14:39 — forked from anonymous/teste
//aqui no controller
chatsFactory.select().then(function(res){
if (res!=null) {
$scope.urldireciona = res.url;
// $scope.urldireciona = res["licenca"];
console.log($scope.urldireciona);
} else {
console.log('No records found');
}
<?php
namespace App\Controller;
use Cart\Model\Table\Cart;
use Cake\Network\Exception\NotFoundException;
use correioXml\Correios\Configure;
class CartController extends AppController {
public function index()
<?php
namespace App\Controller;
use Cart\Model\Table\Cart;
use Cake\Network\Exception\NotFoundException;
class CartController extends AppController {
public function index()