- String Calculator http://osherove.com/tdd-kata-1/
- String Calculator With Interactions http://osherove.com/tdd-kata-2/
- Bowling Game Kata http://butunclebob.com/ArticleS.UncleBob.TheBowlingGameKata
- ThePrimeFactorsKata http://butunclebob.com/ArticleS.UncleBob.ThePrimeFactorsKata
This file contains hidden or 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 * as React from 'react' | |
| function ProviderComposer({contexts, children}) { | |
| return contexts.reduceRight( | |
| (kids, parent) => React.cloneElement(parent, { children: kids }), | |
| children | |
| ) | |
| } | |
| function ContextProvider({ children }) { |
This file contains hidden or 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
| FROM node:6 | |
| RUN apt-get update && apt-get -y install cron | |
| RUN mkdir /app | |
| ADD test.js /app | |
| # Add crontab file in the cron directory | |
| ADD crontab /etc/cron.d/hello-cron |
This file contains hidden or 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
| version: '2' | |
| services: | |
| elasticsearch: | |
| build: | |
| context: elasticsearch/ | |
| volumes: | |
| - ./elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro | |
| ports: |
This file contains hidden or 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} from "react"; | |
| import {connect} from "react-redux"; | |
| import _ from "lodash"; | |
| import { Message } from "semantic-ui-react"; | |
| import {Portal} from 'react-portal'; | |
| import {selectNotifications} from "./notificationSelectors"; | |
| import {dismissNotification} from "./notificationActions"; |
This file contains hidden or 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
| 'use strict'; | |
| module.exports = function CustomError(message, extra) { | |
| Error.captureStackTrace(this, this.constructor); | |
| this.name = this.constructor.name; | |
| this.message = message; | |
| this.extra = extra; | |
| }; | |
| require('util').inherits(module.exports, Error); |
This file contains hidden or 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
| var socket = null; | |
| function bootstrap() { | |
| // 適当な図形を描画 | |
| var c = document.getElementById('mycanvas'); | |
| var ctx = c.getContext('2d'); | |
| ctx.globalalpha = 0.3; | |
| for(var i=0; i<1000; i++) { | |
| ctx.beginPath(); |
This file contains hidden or 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
| # DATABASE | |
| DATABASE_DATA_DIR=./docker/postgres/data | |
| DATABASE_LOG_DIR=./docker/postgres/logs | |
| DATABASE_HOST=db | |
| DATABASE_PORT=5432 | |
| DATABASE_NAME=mydbname | |
| DATABASE_USER=myusername | |
| DATABASE_PASSWORD=mypassword | |
| # phpPgAdmin |
This file contains hidden or 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
| //events - a super-basic Javascript (publish subscribe) pattern | |
| var events = { | |
| events: {}, | |
| on: function (eventName, fn) { | |
| this.events[eventName] = this.events[eventName] || []; | |
| this.events[eventName].push(fn); | |
| }, | |
| off: function(eventName, fn) { | |
| if (this.events[eventName]) { |
This file contains hidden or 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
| <?php | |
| abstract class BaseModelManager { | |
| protected $em; | |
| protected $class; | |
| protected $repository; | |
| protected $container; | |
| /** | |
| * Constructor. |
NewerOlder