Skip to content

Instantly share code, notes, and snippets.

@clubeagn
clubeagn / file.html
Created August 17, 2018 13:01
schema.org
<script type='application/ld+json'>
{
"@context": "https://schema.org",
"@type": "Organization",
"url": "https://airat.biz/",
"sameAs": [
"https://www.facebook.com/AiratBiz",
"https://plus.google.com/100793200182246131281",
"https://vk.com/AiratBiz",
"https://www.youtube.com/user/AiratHalitov",
@clubeagn
clubeagn / datatables.js
Last active July 23, 2018 14:01
datatables laravel
$(function () {
$('#tbl_veiculos').DataTable({
processing: true,
serverSide: true,
ajax: '/api/XXXXXX/XXXXXX-json',
columns:[
{data :'XXXXXX', name:'XXXXXX'},
],
"columnDefs": [
@clubeagn
clubeagn / backup.js
Created June 22, 2018 19:37 — forked from CesarBalzer/backup.js
Script backup sqllite cordova com o plugin sqlporter e arquivo txt na raiz do dispositivo
/**
*
* @var db Base de dados para backup e restauracao
*/
var db = window.openDatabase("CAMINHO DO BANCO", "1.0", "NOME DO BANCO", 5 * 2048);
/**
* Mostra o erro de arquivo
* @param {obj} error Recebe o objeto de erro
* @returns {void}
*/
<!DOCTYPE html>
<html>
<title> TESTE AJAX </title>
<body>
<button onclick="nome_da_funcao()">CLIQUE AQUI</button>
<div id="teste"> </div>
</body>
</html>
@clubeagn
clubeagn / pagina.php
Created June 13, 2018 13:57 — forked from jhowbhz/pagina.php
exemple F7/JSON/PHP
<?php
header('Access-Control-Allow-Origin: *'); // no cabeçalho
$array = array ('test1', 'test2', 'test3');
echo json_encode ($ array);
?>
@clubeagn
clubeagn / example_ajax.html
Created June 13, 2018 13:57 — forked from jhowbhz/example_ajax.html
example_ajax
<!DOCTYPE html>
<html>
<title> TESTE AJAX </title>
<body>
<button>CLIQUE AQUI</button>
<div id="teste"> </div>
</body>
</html>
@clubeagn
clubeagn / script.js
Created June 13, 2018 13:57 — forked from jhowbhz/script.js
exampe F7/JSON/PHP
var test1 = 'test1';
var test2 = 'test2';
app.request.get ('pagina.php', {
FIELD1: teste1,
FIELD2: test2,
}, function (data) {
JSON.parse (data) // transforms into JSON array
console.log (data); // prints on the console the return
})