Skip to content

Instantly share code, notes, and snippets.

View emanuelbg's full-sized avatar

Emanuel BG emanuelbg

  • Emanuel BG Design
  • João Pessoa, PB - Brazil
  • 06:30 (UTC -03:00)
View GitHub Profile
@mattwiebe
mattwiebe / podbean-oembed.php
Created April 21, 2018 16:24
PodBean oEmbed support in WordPress
<?php
/**
* Add Support for PodBean Embed URLs in WordPress.
* Modified from https://core.trac.wordpress.org/ticket/31068#comment:12 to use newer oEmbed endpoint
*
* Just paste an episode URL on a line.
* @link https://core.trac.wordpress.org/ticket/31068#comment:12
* @see wp_oembed_get()
* @param $providers [array] Existing oEmbed Providers
* @return [array] Providers with custom additions
@tevko
tevko / respsizes.js
Last active January 31, 2016 10:31
Dev Tools Snippet to auto-calculate responsive image sizes value on window resize
/**
*
* Paste image class / identifier in IIFE parenthesis at end of function
*
* */
(function(i){"use strict";var img=$(i),sizes=[];window.addEventListener("resize",()=>{var vw=Math.round(((img.offsetWidth*100)/window.innerWidth))+"vw",mq="(min-width: "+window.innerWidth+"px)",value=vw;vw!=="0vw"&&sizes.indexOf(vw)===-1&&(sizes.push(value),console.log(mq,vw))})})("PASTE CLASS OR IDENTIFIER HERE");
@danielfilho
danielfilho / braziljs-2014-talks.md
Last active November 27, 2022 21:04
Talks, slides and links from BrazilJS 2014

#BrazilJS 2014

Talks: slides & Links

Day Talk Speaker Links
1 Why ServiceWorker may be the next big thing Renato Mangini interview · slides · video
1 Frontend at Scale - The Tumblr Story Chris Miller interview · slides · video
1 Intro to GFX: Raw WebGL Nick Desaulniers interview · slides · video
@pitch-gist
pitch-gist / gist:2999707
Created June 26, 2012 22:21
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>