Skip to content

Instantly share code, notes, and snippets.

View andrebian's full-sized avatar

Andre Cardoso andrebian

View GitHub Profile
andrebian / current-time-events.html
Created August 25, 2018 22:51
Youtube iframe API - Eventos baseado no tempo atual do video (current time events)
<div id="player" data-video-id="ZZ5LpwO-An4"></div>
<script type="text/javascript" src=""></script>
<script type="text/javascript">
var tag = document.createElement('script');
var firstScriptTag = document.getElementsByTagName('script')[0];
// O container do video
var playerDiv = $('#player');
andrebian /
Created April 28, 2018 22:38
Configurando mais de um repositório
# Adicionando o primeiro repositório, do Github
$ git remote add origin
# Agora adicionando um segundo repositório, vou nomear como **build**
git remote add build ssh://user@server/pasta_do_repositorio.git
## Obtendo atualizações dos repositórios
andrebian / zap-loading.html
Last active December 9, 2016 11:50
A WhatsApp Web loading clone
<title>Zap Loading - A WhatsApp Web loading clone</title>
<meta charset="UTF-8">
<meta name="description" content="A WhatsApp Web loading clone">
<meta name="keywords" content="loading, loading svg">
Verifying that +andrebian is my blockchain ID.
class RequestPost {
public Boolean isJson(String str) {
try {
new JSONObject(str);
} catch (JSONException ex) {
// ViewController.swift
// apirequest
// Created by Andre Cardoso on 9/24/15.
import UIKit
import Foundation
import UIKit
import MobileCoreServices
class ViewController: UIViewController, UINavigationControllerDelegate, UIImagePickerControllerDelegate {
@IBOutlet weak var imgView: UIImageView!
var newMedia: Bool?
public function beforeFind($queryData)
// Verifica se o primeiro campo da ordenação está setado
if (!empty($queryData['sort']) && $queryData['sort'] == 'primeiro_campo') {
// Caso esteja, adiciona o segundo elemento junto à ordenação padrão
* Simple excel writer class with no external dependencies, drop it in and have fun
* @author Matt Nowack
* @link
* @license Unlicensed
* @version 1.0
class Excel {
andrebian / .htaccess
Created March 25, 2015 16:33
Um .htaccess para melhoras significativas de pagespeed
# Ativando compactação
<FilesMatch ".(js|css|html|htm|php|xml)$">
SetOutputFilter DEFLATE
# Ativando cache no browser
<IfModule mod_expires.c>
ExpiresActive on