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
| class Game | |
| def initialize | |
| @board = Board.new 100,100 | |
| add_objects | |
| end | |
| def add_objects | |
| #add objects to board |
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
| vagrant@habitrpg:/vagrant$ gulp test | |
| [23:37:32] Using gulpfile /vagrant/gulpfile.js | |
| [23:37:34] Starting 'test:all'... | |
| [23:37:34] Starting 'lint:server'... | |
| [23:37:36] Starting 'lint:common'... | |
| [23:37:36] Starting 'lint:tests'... | |
| [23:37:37] Finished 'lint:server' after 3.22 s | |
| [23:37:58] Finished 'lint:common' after 22 s | |
| [23:37:59] Finished 'lint:tests' after 23 s | |
| [23:37:59] Starting 'lint'... |
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'; | |
| const expect = require('chai').expect; | |
| describe('foo', () => { | |
| it('should finish', (done) => { | |
| Promise | |
| .reject(new Error()) | |
| .catch(() => expect(false).to.be.true) | |
| .then(() => done(), done); |
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
| .jumbotron | |
| .container | |
| .visible-xs-block | |
| .center-block | |
| img( | |
| alt="AutoCron" | |
| src="/images/logos/AutoCronLogo.svg") | |
| .title.h1 | |
| | AutoCron | |
| .subtitle.h1 |
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'; | |
| riot.tag2('cron-time', ' <select onchange="{_update}">\n <option each="{hours}" value="{hour}" __selected="{selected}">{hour}</option>\n </select>\n', '', '', function(opts) { | |
| const self = this; | |
| function range(start, end) { | |
| return Array.apply(Array, Array(1 + end - start)).map((_, i) => { | |
| return i + start; | |
| }); | |
| } | |
| this.hours = range(opts.dayStart + 1, 24).map((hour) => { |
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
| User.find({UTCCronTime: hour}) | |
| .each((user) => { | |
| api.getUser(user); | |
| }) | |
| .catch((err) => { | |
| console.log(err); | |
| }); |
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
| function getConnection(connectionString) { | |
| return Promise.try(() => { | |
| return mongoose.connect(uri); | |
| }) | |
| .disposer(() => { | |
| mongoose.disconnect(); | |
| }) | |
| } | |
| Promise.using(getConnection(uri), (connection) => { |
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
| function! MoveToMiddle() | |
| let end = strdisplaywidth(substitute(getline('.'), '\s*$', '', '')) | |
| let start = indent('.') | |
| call cursor(0, (start + end)/2) | |
| endfunction | |
| map gm :call MoveToMiddle()<cr> |
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
| funcWithCallback(args, createCallback(obj)); | |
| function createCallback(obj) { | |
| return function (err, data) { | |
| //do stuff with data and obj | |
| } | |
| } |
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 { | |
| createAndPopulateGroup, | |
| generateUser, | |
| } from '../../../helpers/api-integration/v2'; | |
| import { each } from 'lodash'; | |
| describe('POST /groups/:id/invite', () => { | |
| context('user is a member of the group', () => { | |
| each({ | |
| 'public guild': {type: 'guild', privacy: 'public'}, |
OlderNewer