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 | |
# Creates new applications within Open Shift Origin using the `oc` command line tool. | |
# | |
# The specified GitHub URL is used to fetch application code. Applications are created with the specified | |
# subdomain as <subdomain>.usb.cs.purdue.edu. The passed user ID is associated with the created application | |
# as a label so that stats fetched for applications can be scoped by user by passing the `-l` flag. | |
# | |
# Usage: | |
# ./make-new-app <GitHub URL> <desired subdomain (eg. 'foobar')> <Pley dashboard user ID> |
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 chalk = require('chalk'); | |
const fs = require('fs'); | |
const del = require('del'); | |
const spawnSync = require('child_process').spawnSync; | |
/** | |
* A script for "yarnifying" projects - updating them to use Yarn instead of npm. | |
* | |
* Usage: |
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 PropTypes from 'prop-types'; | |
import CBR from 'connect-backbone-to-react'; | |
/** | |
* Don't use `BackboneProvider` from `connect-backbone-to-react`; only use `connectBackboneToReact`. | |
* | |
* `BackboneProvider` allows you to make Backbone Models and Collections available "globally" for a | |
* set of components and is bad for a couple of reasons: | |
* - Components that expect to receive Backbone Models or Collections from their parent 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
import PropTypes from 'prop-types'; | |
/** | |
* This is an example presentational component. Check out this article for details on why we use | |
* presentational components: | |
* https://medium.com/@dan_abramov/smart-and-dumb-components-7ca2f9a7c7d0. | |
* | |
* The names of presentational components should be suffixed with '-Template'. This is done so that | |
* our React naming conventions align with our Backbone naming conventions. |
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
// ... | |
// An example of one of our "custom virtual DOM" functions | |
/** | |
* Updates a template folder's name among the user's list of template folders. | |
* | |
* @param {TemplateFolderModel} templateFolderModel | |
*/ | |
_updateTemplateFolderName(templateFolderModel) { | |
const id = templateFolderModel.get('_id'); |
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 MeetingTypesDashboardView = Backbone.View.extend({ | |
render() { | |
ReactDOM.render( | |
<MeetingTypesDashboard />, | |
this.el | |
); | |
return this; |