Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am brunomuler on github.
  • I am brunomuller (https://keybase.io/brunomuller) on keybase.
  • I have a public key ASAipJgjZ928cKXftPcGHPv2nuhZa7qLp1oTZu3MYfCy-Ao

To claim this, I am signing this object:

@brunomuler
brunomuler / gist:e19fcf231900d62b3ac5
Created January 23, 2015 17:42
Rewrite htaccess
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domainname\.com\.br$ [OR]
RewriteCond %{HTTP_HOST} ^www\.domainname\.com\.br$
RewriteRule ^(.*)$ "http\:\/\/destinydomain\.com\.br\/$1" [R=301,L]
@brunomuler
brunomuler / canvas_support
Created January 9, 2015 17:18
Check canvas support
app.isCanvasSupported = function(){
var elem = document.createElement('canvas');
return !!(elem.getContext && elem.getContext('2d'));
}
@brunomuler
brunomuler / gist:803bda12c665236071ba
Last active August 29, 2015 14:13
requestAnimFrame with fallback
window.requestAnimFrame = (function(){
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
function( callback ){
window.setTimeout(callback, 1000 / 60);
};
})();