Skip to content

Instantly share code, notes, and snippets.

View joasgarcia's full-sized avatar

Joás Garcia joasgarcia

View GitHub Profile
@joasgarcia
joasgarcia / moveCommitsToAnotherBranch.sh
Created December 29, 2016 13:56
Mover commits para uma nova branch
git branch newbranch
git reset --hard HEAD~3 # Go back 3 commits. You *will* lose uncommitted work.*1
git checkout newbranch
@joasgarcia
joasgarcia / createCustomer.php
Created March 14, 2018 18:11
Criar cliente API ASAAS
<?php
$customerData = array(
"name" => "João da Silva",
"cpfCnpj" => "09434952967",
"postalCode" => "89223005",
"mobilePhone" => "47989134255",
"email" => "joasdasilva@teste.com.br"
);
$customerParamsJson = json_encode($customerData);
@joasgarcia
joasgarcia / getCustomer.php
Created March 23, 2018 11:58
Consultar cliente API ASAAS
$ch = curl_init();
curl_setopt($ch , CURLOPT_URL, "https://www.asaas.com/api/v3/customers");
curl_setopt($ch , CURLOPT_HTTPGET, true);
curl_setopt($ch , CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch , CURLOPT_HTTPHEADER, array(
"Content-Type: application/json",
"access_token: <COLOQUE AQUI A SUA API>"
));
$response = curl_exec($ch);
curl_close($ch);