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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>name</key> | |
<string>Railscasts 2</string> | |
<key>settings</key> | |
<array> | |
<dict> | |
<key>settings</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
# change *.* to *.jpg to only target JPGs, for example | |
# and to customize the search... | |
# sed -e 's, what you're searching for goes in this space , what you want to replace it with goes here ,g' | |
#the default example here with turn spaces into nothing ( i.e. remove all spaces from file names ) | |
for i in *.*; do mv "$i" "`echo $i | sed -e 's, ,,g'`"; done |
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
Verifying that +kevinsalter is my openname (Bitcoin username). https://onename.io/kevinsalter |
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, {Component, PropTypes} from 'react'; | |
import $ from 'jquery'; | |
import Loading from './loading.js'; | |
import MainView from './main-view.js'; | |
class Container extends Component { | |
static propTypes = { | |
loadingTimeout: PropTypes.number.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
import React from 'react'; | |
import {shallow, mount} from 'enzyme'; | |
import {assert} from 'chai'; | |
import {spy} from 'sinon'; | |
import Container from '../src/container.js'; | |
describe('<Container />', () => { | |
it('should show the <Loading /> component be default', () => { | |
const wrapper = shallow(<Container />); |
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 {shallow} from 'enzyme'; | |
import {assert} from 'chai'; | |
import Loading from '../src/loading.js'; | |
describe('<Loading />', () => { | |
const LOADING_PROPS = { | |
imgSrc: 'https://media.giphy.com/media/feN0YJbVs0fwA/giphy.gif' | |
}; |
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 {shallow} from 'enzyme'; | |
import {assert} from 'chai'; | |
import {spy} from 'sinon'; | |
import MainView from '../src/main-view.js'; | |
import {Users} from '../fixtures/users.js'; | |
describe('<MainView />', () => { | |
const MAIN_VIEW_PROPS = { |
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 getReorderedQuestions = (event, questions) => { | |
const movedQuestion = questions.find((question, index) => index === event.oldIndex); | |
const remainingQuestions = questions.filter((question, index) => index !== event.oldIndex); | |
const reorderedQuestions = []; | |
remainingQuestions.forEach((question, index) => { | |
if (index === event.newIndex) { | |
reorderedQuestions.push(movedQuestion); | |
reorderedQuestions.push(question); | |
} else { |
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 reorderArray = (event, originalArray) => { | |
const movedItem = originalArray.find((item, index) => index === event.oldIndex); | |
const remainingItems = originalArray.filter((item, index) => index !== event.oldIndex); | |
const reorderedItems = [ | |
...remainingItems.slice(0, event.newIndex), | |
movedItem, | |
...remainingItems.slice(event.newIndex) | |
]; | |
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
/** | |
* ellipsisify | |
* @param {string} filename - The filename to be truncated. | |
* @param {number} lengthThreshold - (optional) The minimum length of filename to truncate. | |
*/ | |
export const ellipsisify = (filename, lengthThreshold = 20) => { | |
// just return the filename if it's less than 20 characters long | |
if (filename.length < lengthThreshold) return filename; |
OlderNewer