I hereby claim:
- I am cristiandouce on github.
- I am cristiandouce (https://keybase.io/cristiandouce) on keybase.
- I have a public key whose fingerprint is DE5C 2DF4 9FF1 EE95 D153 3C99 D169 5000 8311 BE8A
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
There's been a strange explosion in misinformation about browserify recently, particularly in comparisons to webpack.
Generally speaking, most of this confusion stems from how webpack is more willing to pull features into its core to ease discoverability while browserify is more likely to push features out to userland instead.
I think that longer-term, separability has more benefits from a maintenance and
var $ = require('NodObjC'); | |
$.import('Cocoa'); | |
var installNSBundleHook = function() { | |
var cls = $.NSBundle; | |
if (cls) { | |
var bundleIdentifier = cls.getInstanceMethod('bundleIdentifier'); | |
bundleIdentifier.setImplementation(function(val) { |
var regex = /twitter.com\/([a-zA-Z0-9_]{1,15})/gi; | |
var arr = []; | |
var text = document.body.innerHTML; | |
while ( (arr = regex.exec(text)) ) { | |
console.log(arr); | |
} | |
console.log(arr) |
var fs = require('fs') | |
, path = require('path') | |
, EventEmitter = require('events').EventEmitter; | |
function Inspector () { | |
var _self = this; | |
_self.on('dir', function(dir) { | |
fs.readdir(dir, function(err, files) { | |
if (err) { |
var text = document.lastChild.innerHTML; | |
var regexs = { | |
// enclosing | |
script: /<(?:script)[\d\D]*?>[\d\D]*?<\/(?:script)>/gi, | |
noscript: /<(?:noscript)[\d\D]*?>[\d\D]*?<\/(?:noscript)>/gi, | |
style: /<(?:style)[\d\D]*?>[\d\D]*?<\/(?:style)>/gi, | |
iframe: /<(?:iframe)[\d\D]*?>[\d\D]*?<\/(?:iframe)>/gi, | |
frame: /<(?:frame)[\d\D]*?>[\d\D]*?<\/(?:frame)>/gi, | |
object: /<(?:object)[\d\D]*?>[\d\D]*?<\/(?:object)>/gi, |
Option.prototype.getOption = function(setting) { | |
var ref = this; | |
setting = setting.split('.'); | |
while (setting.length) { | |
if(!(ref = ref[setting.shift()])) break; | |
} | |
return ref; | |
} |
I didn't have a great time trying to implement a simple feature involving Google Analytics in one of my projects (nodejs web application).
My humble requirement was to collect some data (events) I was pushing to Google Analytics in order to create a simple report for my users. Since it isn't a critical report, my idea was to get the data once a day and cache it.
So, as simple as it seems, it has been a tough trip for me and I want to share the whole process with the community. I hope anyone trying to achive something similar gets to this article and find it helpful.
These are the main steps I had to take:
/*jslint undef: true, nomen: true, eqeqeq: true, plusplus: true, newcap: true, immed: true, browser: true, devel: true, passfail: false */ | |
/*global window: false, readConvertLinksToFootnotes: false, readStyle: false, readSize: false, readMargin: false, Typekit: false, ActiveXObject: false */ | |
var dbg = (typeof console !== 'undefined') ? function(s) { | |
console.log("Readability: " + s); | |
} : function() {}; | |
/* | |
* Readability. An Arc90 Lab Experiment. | |
* Website: http://lab.arc90.com/experiments/readability |
config.json | |
reading-image.png |