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
--[[ | |
Youtube playlist importer for VLC media player 1.1 and 2.0 | |
Copyright 2012 Guillaume Le Maout | |
Authors: Guillaume Le Maout | |
Contact: http://addons.videolan.org/messages/?action=newmessage&username=exebetche | |
This program is free software; you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation; either version 2 of the License, or |
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
export default function(file, api) { | |
const j = api.jscodeshift; | |
const f = j(file.source); | |
f.find(j.ClassDeclaration).forEach((c) => { | |
j(c).find(j.ClassProperty, { | |
value: { type: 'ArrowFunctionExpression' }, | |
}).forEach((cp) => { | |
let canReplace = true; |
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
const order = [ | |
/^lib\//, | |
/^actions\//, | |
/^reducers\//, | |
/^constants\//, | |
/^containers\//, | |
/^components\//, | |
/^schema\/[A-Z]/, | |
/^schema\//, | |
/^\.\.?\/[A-Z]/, |
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
function getDisplayName(WrappedComponent) { | |
return WrappedComponent.displayName || WrappedComponent.name || 'Component'; | |
} | |
export function logComponentUpdate(WrappedComponent) { | |
return class Wrapped extends WrappedComponent { | |
static displayName = `logComponentUpdate(${getDisplayName(WrappedComponent)})`; | |
static WrappedComponent = WrappedComponent; | |
shouldComponentUpdate(nextProps, nextState) { |
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
import React from 'react'; | |
import { Link } from 'react-router'; | |
import { MegaRouteHandler } from '../src'; | |
import { schema } from './api'; | |
export class Layout extends React.Component { | |
render() { | |
return <div> | |
<Header /> |
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
import React from 'react'; | |
import Router from 'react-router'; | |
const { Route, DefaultRoute, RouteHandler, Link } = Router; | |
import MegaClient from '../mega-js'; | |
const makePropTypes = function(schema) { | |
switch (schema.type) { | |
case 'string': | |
return React.PropTypes.string.isRequired; |
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
tracker | success | c | |
-----------------------------------------------------------------------------------------+---------+------- | |
http://open.nyaatorrents.info:6544/announce | t | 7214 | |
http://exodus.desync.com/announce | t | 6392 | |
http://torrent.ubuntu.com:6969/announce | t | 68 | |
http://pubt.net:2710/announce | t | 51 | |
http://tracker.anime-index.org:6969/announce | t | 17 | |
http://3.ehtracker.org/756078/announce | t | 17 | |
http://f.ehtracker.org/792955/announce | t | 17 | |
http://tracker.frozen-layer.net:6969/announce |
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
type NullString struct { | |
Valid bool | |
Value string | |
} | |
func (n NullString) MarshalJSON() ([]byte, error) { | |
if n.Valid == false { | |
return []byte("null"), nil | |
} else if d, err := json.Marshal(n.Value); err != nil { | |
return nil, stackerr.Wrap(err) |
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
/** @jsx React.DOM */ | |
var assert = require('chai').assert; | |
var React = require('react/addons'); | |
var TestUtils = React.addons.TestUtils; | |
var PersonList = require('./person-list.jsx'); | |
describe('PersonList', function() { |