Skip to content

Instantly share code, notes, and snippets.

Gustavo Henke gustavohenke

Block or report user

Report or block gustavohenke

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
# Put me in your .bash_profile and enjoy rainy days reinstalling deps
windows_restart() {
rm -rf node_modules
if [ -f "yarn.lock" ]; then
npm install

Keybase proof

I hereby claim:

  • I am gustavohenke on github.
  • I am gustavohenke ( on keybase.
  • I have a public key whose fingerprint is 1FFB E83F 4C57 C8D0 A65C 4388 7A48 53C4 38D5 C9BB

To claim this, I am signing this object:

gustavohenke / collect.js
Last active Aug 29, 2015
Collect all Angular.js scopes
View collect.js
function collect( element ) {
var scope;
var watchers = [];
element = angular.element( element );
scope ="$scope");
if ( scope ) {
watchers = scope.$$watchers || watchers;
View svg2png.js
var svg = document.querySelector( "svg" );
var svgData = new XMLSerializer().serializeToString( svg );
var canvas = document.createElement( "canvas" );
var ctx = canvas.getContext( "2d" );
var img = document.createElement( "img" );
img.setAttribute( "src", "data:image/svg+xml;base64," + btoa( svgData ) );
img.onload = function() {
You can’t perform that action at this time.