Skip to content

Instantly share code, notes, and snippets.

Avatar

Robert Knight robertknight

View GitHub Profile
@danharper
danharper / normalize-filenames.js
Last active Aug 17, 2018 — forked from dcramer/normalize-filenames.js
use Sentry (Raven) on PhoneGap
View normalize-filenames.js
Raven.config(dsn, {
dataCallback(data) {
const normalize = filename => filename.split('/www/', 2)[1]
data.exception.values[0].stacktrace.frames.forEach(frame => {
frame.filename = normalize(frame.filename)
})
data.culprit = data.exception.values[0].stacktrace.frames[0].filename
@mattmccray
mattmccray / component-with-mixins.js
Created Feb 17, 2015
ES6 Classes w/Mixins -- Idea -- React 0.13
View component-with-mixins.js
export function ComponentWithMixins( ...mixins) {
class MixedComponent extends React.Component { }
for( let mixin of mixins) {
// TODO: Would need to handle mixin collisions...
for( let name of Object.keys( mixin)) {
MixedComponent.prototype[ name]= mixin[ name]
}
}
You can’t perform that action at this time.