Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Erik Figueiredo erikfig

🏠
Working from home
View GitHub Profile
View gist:7908cfffdc910bf02c45edd89bdc1faf
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,
View gist:dea2ff8f31cc5489f480374a4edd2c56
<?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 — forked from mhartington/ghUpdate.bash
Alias to update a forked repo with the original. One for zsh and one for bash
View ghUpdate.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:
View 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');
}
View gist:29721d8a3cba370d2443
<?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()
View gist:0114f37ff321b734cf9d
<?php
namespace App\Controller;
use Cart\Model\Table\Cart;
use Cake\Network\Exception\NotFoundException;
class CartController extends AppController {
public function index()