This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Enter steps to reproduce below:] | |
| 1. ... | |
| 2. ... | |
| **Atom Version**: 1.6.1 | |
| **System**: Mac OS X 10.9.5 | |
| **Thrown From**: [keybinding-resolver](https://github.com/atom/keybinding-resolver) package, v0.33.0 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta name="description" content="3 ways to do Promise.all(asyncVals)"> | |
| <script src="https://cdn.rawgit.com/lodash/lodash/3.0.1/lodash.min.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/4.0.6/rx.all.js"></script> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| </head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // simple bookmarklet to hide events and re-hide them when re-activated | |
| javascript:(function($){ | |
| var itemsStr = localStorage.getItem('hiddenItems') || '[]'; | |
| var itemsArr = JSON.parse(itemsStr); | |
| var $a = $('li.event h3 a'); | |
| $(document).off('click'); | |
| $('.hider').remove(); | |
| $(document).on('click','.hider',hiderClicked); | |
| itemsArr.forEach(hideItem); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| javascript:(function(){ | |
| window.angular.debug = { | |
| searchScope : function(varName,options) { | |
| var registeredScopes = {}; | |
| var opts = angular.extend({ | |
| includeFns:false, | |
| includeHidden:false, | |
| recurseDepth:20 | |
| }, options); | |
| var testFn = function(test,testStr){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Instructions - create a bookmark. Save this code as the url. | |
| // Click the bookmarklet to see watch count output in the console. | |
| // Currently counts watches by nodeName. It would be more useful by class. TBD. | |
| javascript: (function () { | |
| var totalWatches = 0; | |
| var watchesByElem = {}; | |
| angular.forEach(angular.element('.ng-scope'), function (elem) { | |
| var s = angular.element(elem).scope(); | |
| var w = s.$$watchers; | |
| if (s.$$watchers) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Instructions. Save as a bookmark. Click when on a repo or github.io (gh-pages branch) site. | |
| javascript:(function(h,p){ | |
| location = /io$/.test(h) ? | |
| 'https://github.com/' + h.split('.')[0] + p: | |
| 'http://'+ p.split('/')[1]+'.github.io'+ '/' + p.split('/').slice(2).join('/') | |
| })(location.host,location.pathname); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // how services, factories, and values work | |
| var foo = { | |
| providers:{}, | |
| instances:{}, | |
| provider:function(name,fn){ | |
| var pName = name + 'Provider'; | |
| foo.providers[pName] = foo.providers[pName] || new fn(); | |
| foo.instances[name] = foo.instances[name] || foo.providers[pName].$get(); | |
| return foo.providers[pName]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;(function(win,doc){ | |
| function _getSelectedText (){ | |
| _getSelectedText = win.getSelection ? // redefine itself when first run | |
| win.getSelection : | |
| doc.getSelection ? | |
| doc.getSelection: | |
| doc.selection ? | |
| function(){return doc.selection.createRange().text;} : | |
| function(){return '';}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*! | |
| * jQuery multi-dependency pubsub v0.01 | |
| * Copyright 2011, Adam Laughlin | |
| * http://a-laughlin.com | |
| * Licensed under MIT & GPL version 2 | |
| * http://static.a-laughlin.com/mit_license.txt | |
| * http://static.a-laughlin.com/gpl_license.txt | |
| * | |
| * inspired by Addy Osmani's example at: | |
| * http://addyosmani.com/blog/jquery-1-7s-callbacks-feature-demystified/ |