Skip to content

Instantly share code, notes, and snippets.

View rajithsam's full-sized avatar
:octocat:

Rajith Sam rajithsam

:octocat:
View GitHub Profile
@rajithsam
rajithsam / Controller.php
Created June 1, 2018 10:19
Enviar PDF Base64 do jsPDF por E-mail Laravel 5.4
<?php
public function enviarPorEmail() {
// gerando um nome para o arquivo
$caminhoDoArquivo = storage_path('projeto-'.uniqid().'.pdf');
// remover data type da string
$base64 = str_replace('data:application/pdf;base64,', '', STRING_PDF_BASE64);
// salvar a string em uma pasta temporária para servir de anexo
file_put_contents($caminhoDoArquivo, base64_decode($base64));
@rajithsam
rajithsam / ngMap_address_auto_complete.html
Last active February 24, 2018 08:46
#Google Maps Autocomplete Input Address# This directive is useful for doing autocomplete input address. It shows the address preview on map. When you drag the pinned location the input filed shows the pinned address!
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Address Autocomplete - Map</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">