Skip to content

Instantly share code, notes, and snippets.

@rest-full
rest-full / style.scss
Last active June 30, 2023 14:24
fontastic via sass
/* arquivo de variaveis -> _variaveis.scss */
$icons: ("connected":"\61", "disconnected":"\62") !default;
$file: 'untitled-font-1';
$path: '../fonts/' + $file;
$location: ('eot': $path + '.eot', 'woff': $path + '.woff', 'ttf': $path + '.ttf', 'svg': $path + '.svg') !default;
/* arquivo de funções no mixin -> mixin/_function.scss */
@function urlIndetification($url) {
$newKey: '';
$format: '';
@rest-full
rest-full / curl api google map
Created November 27, 2022 21:56
curl api google map
echo searching(['CURLOPT_CUSTOMREQUEST' => 'POST', 'CURLOPT_FOLLOWLOCATION' => true, 'CURLOPT_HTTPGET' => true, 'CURL_SSL_VERIFYPPER' => 0, 'CURL_HEADER' => 0]);
function searching(array $datas):string
{
$ch = curl_init('https:\\maps.googleapis.com\maps\api\geocode\json?key=meu_key&address=Rua+Atílio+Milano,+171+-+Del+Castilho,+Rio+de+Janeiro+-+RJ,+21050-560');
if (array_key_exists('CURLOPT_CUSTOMREQUEST', $datas) !== false) {
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $datas['CURLOPT_CUSTOMREQUEST']);
}
if (array_key_exists('CURLOPT_POSTFIELDS', $datas) !== false) {
curl_setopt($ch, CURLOPT_POSTFIELDS, $datas['CURLOPT_POSTFIELDS']);