I have been working on making a search index for npm modules that work with browserify. In order to do this, obviously, for each module on npm, I need to determine whether or not it works with browserify. Easy! I thought. I will run the browserify cli tool on the module browserify node_modules/that_module
, and if it exits normally, it works with browserify. So I did that, and implemented a search engine on this premise. Except that, in the search results, I found a lot of modules which, although it "passed the test", they still were useless because simple the act of loading the bundle in a browser would result in a runtime error - a lot of these were a result of the module testing for process.versions.node
which doesn't exist in the browserify process shim. Okay, I thought, I'll run the resulting bundle in jsdom, genious! That did reject lots of modules, but it still wasn't good enough. I still got a lot of modules in the search inde
This file contains 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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
</head> | |
<body> | |
<iframe name="ad_iframe" src="./casper_test.html" /> | |
</body> | |
</html> |
This file contains 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
var casper = require("casper").create(), | |
viewportSizes = [ | |
[320,480], | |
[320,568], | |
[600,1024], | |
[1024,768], | |
[1280,800], | |
[1440,900] | |
], | |
url = casper.cli.args[0], |
This file contains 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
txticon = function(iconname) { | |
var map = { | |
"glass": "E001", | |
"leaf": "E002", | |
"dog": "1F415", | |
"user": "E004", | |
"girl": "1F467", | |
"car": "E006", | |
"user_add": "E007", | |
"user_remove": "E008", |
This file contains 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
/* | |
* Custom JS macros for creating tags in GTM that populate event information from | |
* element attributes. | |
* | |
* Author: Joshua Kehn <[email protected]> | |
* Copyright: (c) 2014 by Joshua Kehn | |
* License: ISC <http://www.isc.org/downloads/software-support-policy/isc-license/> | |
*/ | |
function () { |
This file contains 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 JSONP support | |
* | |
* JSONP.get('https://api.github.com/gists/1431613', function (data) { console.log(data); }); | |
* JSONP.get('https://api.github.com/gists/1431613', {}, function (data) { console.log(data); }); | |
* | |
* gist: https://gist.github.com/gists/1431613 | |
*/ | |
var JSONP = (function (document) { | |
var requests = 0, |
This file contains 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
// copy code from http://stackoverflow.com/questions/17527870/how-does-trello-access-the-users-clipboard/17528590 | |
(function() { | |
var utils = { | |
nodeName: function(node, name){ | |
return !!(node.nodeName.toLowerCase() === name) | |
} | |
}; | |
var textareaId = 'simulate-trello-clipboard' | |
, containerId = textareaId + '-container' |
This file contains 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
Enable-RemoteDesktop | |
cinst ccleaner | |
cinst console-devel | |
cinst expresso | |
cinst fiddler4 | |
cinst filezilla | |
cinst firefox | |
cinst git-credential-winstore | |
cinst irfanview |
This file contains 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
set -g default-terminal "screen-256color" | |
set -g status-utf8 on | |
bind M source-file ~/.tmux/mac.session | |
bind L source-file ~/.tmux/linux.session | |
# set -g terminal-overrides 'xterm*:smcup@:rmcup@' | |
# THEME | |
set -g status-bg black |