Skip to content

Instantly share code, notes, and snippets.

Caio Gondim caiogondim

Block or report user

Report or block caiogondim

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@caiogondim
caiogondim / draw.js
Last active Aug 11, 2017
JavaScript native face detection
View draw.js
async function draw (canvas, video, overlay) {
window.requestAnimationFrame(() => draw(canvas, video, overlay))
const context = canvas.getContext('2d')
const videoCompStyle = window.getComputedStyle(video)
const videoWidth = videoCompStyle.width.replace('px', '')
const videoHeight = videoCompStyle.height.replace('px', '')
context.drawImage(video, 0, 0, videoWidth, videoHeight)
clearTimeout(hideTimeout)
if (faces.length) {
View small-things-i-learned-this-week.md
View underscore-memoize-perf.js
'use strict'
const _ = require('./underscore')
const Benchmark = require('benchmark')
const debug = require('logdown')()
// Current
function fibonacci(n) {
return n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2)
View gist:7ef07923d9891e597210
function isValidEmail(email) {
var input = document.createElement('input')
input.type = 'email'
input.value = email
return input.validity.valid
}
@caiogondim
caiogondim / index.js
Last active Aug 29, 2015
requirebin sketch
View index.js
// require() some stuff from npm (like you were using browserify)
// and then hit Run Code to run it on the right
var Logdown = require('logdown')
var fooLogger = new Logdown({prefix: 'foo'})
fooLogger.log('Lorem')
fooLogger.info('Lorem')
fooLogger.warn('Lorem')
var barLogger = new Logdown({prefix: 'bar'})
View gist:9c61cdec4152fc7589df
View heinekens.md

Almir

  • 17/02/2013 Post Web Audio Hero: 19 heinekens / 0 pagas
  • 10/03/2013 Post Propagação de eventos em JS: 3 heinekens / 0 pagas

Caio

  • 10/02/2013 Post Eventos online e offline: 5 heinekens / 5 pagas
  • 03/03/2013 Post Console e command line API: 3 heinekens / 0 pagas
@caiogondim
caiogondim / wednerday.md
Created Jul 18, 2012 — forked from almirfilho/wednerday.md
Wednerday do Loop Infinito
View wednerday.md
You can’t perform that action at this time.