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
class RestrictPrecisionOnExistingMetrics < ActiveRecord::Migration | |
def up | |
ActiveRecord::Base.record_timestamps = false | |
begin | |
AnswersMetric.find_each(&:save) | |
MetricValue.find_each(&:save) | |
ensure | |
ActiveRecord::Base.record_timestamps = true |
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
define([ | |
'angular' | |
], function(angular) { | |
'use strict'; | |
angular.module('common.pagination', []) | |
/** | |
* @ngdoc service |
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
namespace :move_eei_content do | |
PROGRAM_IDS = [ 595, 596, 597, 598, 599, 600, 601, 602, 603, 613, 614, 615, 616, 617, 618, 849, 855, 856, 619, 620, 621, 622, 623, 625, 626, 627, 656, 628, 629, 630, 631, 632, 633, 634, 859, 882, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 624, 651, 652, 653, 654, 655, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667 ] | |
CIVIC_CHARACTER_FORMATION_ID = 32 | |
desc 'moves selected eei programs to civic character formation champion' | |
task :run => :environment do | |
Tree.where(id: PROGRAM_IDS).each do |tree| | |
puts "Moving #{tree.title}..." |
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 { authApiFetch } from '../util/fetch'; | |
export function loadImpa() { | |
return (dispatch) => { | |
authApiFetch('/api/get-impa', { | |
method: 'GET' | |
}).then((data) => { | |
if (data.error) { |
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
// ctrl | |
() => { | |
this.dataObj = new supergloo.pager('connected_users'); | |
} | |
// html |
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'; | |
class InputList extends React.Component { | |
constructor({ items }) { | |
super({ items }); | |
this.state = { items }; | |
} | |
render() { |
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 Web3 = require('web3'); | |
const fetch = require('node-fetch'); | |
const POLLING_INTERVAL = 5000; | |
const EVENTS = { | |
Transfer: {} | |
}; | |
const web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:7545")); |
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 Web3 = require('web3'); | |
const fetch = require('node-fetch'); | |
const ipfsAPI = require('ipfs-api'); | |
const ipfs = ipfsAPI('localhost', '5002'); | |
const POLLING_INTERVAL = 5000; | |
const EVENTS = { | |
Transfer: {} | |
}; |
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
mapping (uint256 => Auction) auctionsByTokenId | |
struct Auction { | |
address highestBidder | |
uint256 highestBidAmount | |
uint256 endsAtBlock | |
uint256 tokenId | |
} | |
uint256 constant INITIAL_BID = 0.01 eth | |
uint256 constant MIN_BID_INCREMENT = 0.01 eth | |
uint256 constant EXPIRED_TOKEN_COST = 0.05 eth |
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
it('should require Auction to be ended', async () => { | |
let playerId = getNextCommonPlayerId(); | |
await instance.createCommonAuction.sendTransaction(playerId, fakeTokenURI); | |
let auctionsCount = (await instance.totalAuctionsCount()).toNumber(); | |
let lastAuctionIndex = auctionsCount - 1; | |
// Start auction: | |
await instance.incrementBid.sendTransaction(lastAuctionIndex, { value: web3.toWei(0.01, 'ether'), from: accounts[1] }); | |
try { |