- Download the perforce visual tool suite from here: http://www.perforce.com/perforce/downloads/index.html
- Copy only the p4merge.app file into your /Applications/ directory
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 nprogress from 'nprogress' | |
import loadJS from 'fg-loadjs' | |
import LoaderSpinner from '../components/LoaderSpinner' | |
import preserver from './Preserver' | |
let firstRoute = true; | |
function asyncRoute(getComponent) { | |
return class AsyncComponent extends React.Component { |
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
// getComponent is a function that returns a promise for a component | |
// It will not be called until the first mount | |
function asyncComponent(getComponent) { | |
return class AsyncComponent extends React.Component { | |
static Component = null; | |
state = { Component: AsyncComponent.Component }; | |
componentWillMount() { | |
if (!this.state.Component) { | |
getComponent().then(Component => { |
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
// Usage: | |
// | |
// function loader() { | |
// return new Promise((resolve) => { | |
// if (process.env.LAZY_LOAD) { | |
// require.ensure([], (require) => { | |
// resolve(require('./SomeComponent').default); | |
// }); | |
// } | |
// }); |
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 { h, cloneElement, Component } from 'preact'; | |
/** Example <Fetch url="/foo.json" /> compositional component. | |
* Just to demonstrate a compositional component that requires input massaging. | |
*/ | |
class Fetch extends Component { | |
state = { loading: true }; | |
componentDidMount() { | |
this.update(); |
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 { Component, PropTypes } from 'react' | |
import { noop } from 'lodash' | |
import raf from 'raf' | |
const cache = new Map() | |
export function createNonBlockingRenderLoop({ key, concurrencyLevel = 1 }) { | |
if (cache.has(key)) { | |
return cache.get(key) | |
} |
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
#!/bin/bash | |
# Merge multiple repositories into one big monorepo. Migrates every branch in | |
# every subrepo to the eponymous branch in the monorepo, with all files | |
# (including in the history) rewritten to live under a subdirectory. | |
# | |
# To use a separate temporary directory while migrating, set the GIT_TMPDIR | |
# envvar. | |
# | |
# To access the individual functions instead of executing main, source this |
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
let moduleQueries = []; | |
let moduleTypeDefinitions = []; | |
let moduleMutations = []; | |
let moduleResolvers = []; | |
let files = config.getGlobbedFiles(path.join(__dirname, "**", "*schema.js")); | |
// Load schema files | |
files.forEach((file) => { | |
let moduleSchema = require(path.resolve(file)); |
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
### Makefile to be used when compiling assets for Event Manager | |
### Based on ideas from https://github.com/acdlite/the-react-way/blob/master/Makefile | |
### | |
### Requirements/assumptions of this Makefile: | |
### JS | |
### - webpack (include json and css loaders to webpack cofig just in case) | |
### - babel | |
### - eslint (eslint-plugin-react if you want more lints of your react code) | |
### - eslint-watch (broken until 2.0.0: https://github.com/rizowski/eslint-watch/issues/8) | |
### CSS |
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
#!/usr/bin/env python2.7 | |
from __future__ import print_function | |
import commands | |
import os | |
import stat | |
from gitlab import Gitlab | |
def get_clone_commands(token, repo_root): | |
con = Gitlab("http://gitlab.your.domain", token) |
NewerOlder