Skip to content

Instantly share code, notes, and snippets.

View gardin1992's full-sized avatar

João Antonio Gardin Vieira gardin1992

View GitHub Profile
<!-- inserir no index.php -->
<DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Titulo do novo Projeto</title>
</head>
<body>
<h1>HTML + CSS + JavaScript</h1>
@gardin1992
gardin1992 / Refator.js
Created October 17, 2017 19:59
Refator
var Structure_CuponsAmazon_Handler = new ( function () {
var _self = this;
// console.log('response', response);
this.saveGetCoupon = function (data, callback) {
$.ajax({
url: '/editor-html/coupons-amazon/users',
type: 'POST',
@gardin1992
gardin1992 / reload-iframe.js
Created October 16, 2017 20:19 — forked from brunopulis/reload-iframe.js
Reload Iframe with embed
// Marca o video esta sendo assistido
// E carrega a legenda dinamicamente com atributo data-*
//
$(function() {
var thumb = $( '.video-item a' ),
mask = $( '.video-item a .mask' ).hide();
// Reload Thumb
thumb.on('click', function(e) {
e.preventDefault();
@gardin1992
gardin1992 / gist:011bdb70666bb0e2b99337c49f024c11
Created October 16, 2017 20:15 — forked from brunopulis/gist:3918839
Realidade Aumentada com JS
Realidade Aumentada é trazer um ambiente virtual para um ambiente real.
1 Passo detectar o getUSerMedia
2 - Reproduzir o conteudo da webcam numa tag <video>
3 - Rastrear um padrao de pixels <canvas>
Hello World Tracking JS
- Importar o core da lib tracking.js
- Importar o modulo de rastreamento de cor.
(deviceOrientation === 'nao' && orientation === 'landscape') ?
_idViewport.content = 'user-scalable=no, width=device-width, initial-scale=1' :
_idViewport.content = 'user-scalable=no, width=' + (device === 'mobile' ? 320 : 768);
if (deviceOrientation === 'nao' && orientation === 'landscape')
_idViewport.content = 'user-scalable=no, width=device-width, initial-scale=1';
else
_idViewport.content = 'user-scalable=no, width=' + (device === 'mobile' ? 320 : 768);

#Instruções

##Para executar esta demonstração (no Chrome ou Firefox), você deve:

  1. Selecione um arquivo existente ou insira um URL. Tenha cuidado ao selecionar um vídeo hospedado em um servidor que permita que esta página obtenha esses vídeos usando XHR (ou seja, usando o CORS) ou execute o Chrome na linha de comando com as opções --test-type e --disable-web-security.

  2. Opcionalmente, altere algumas configurações: *Configurações de download: Selecione um tamanho de pedaço para o download do arquivo de mídia. 0 significa buscar o arquivo inteiro em um XHR.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Player Stream Js</title>
</head>
<body>
<div id="OmbPlayer">
<video data-index="0">
[{
// staff delete/:id or get/:id
"url": 'https://scheduler.wix.com/_api/scheduler-server/owner/staff/95226929-e7f4-409d-8e75-85f1fa0bf105'
}, {
// staff get all
"staff": [{
"id": "5999c1e4-64b2-4b72-824a-b300545ccde7",
"fullName": "Membro da equipe #1",
"email": "joaogardin@hotmail.com",
"phone": "",
@gardin1992
gardin1992 / CircleExample.html
Created September 17, 2016 00:57
Classe em JavaScript
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<script>
// Define o objeto Circle
var Circle = function () {
// Guarda o valor do escopo atual
var sendImg = new(function() {
var _self = this;
_self.url = '';
this.send = function(formData, callback) {
console.log(_self.url);
if (_self.url) {
$.ajax({
method: "POST",
url: _self.url,
processData: false,