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>AppleAntiAliasingThreshold</key> | |
<integer>1</integer> | |
<key>ApplePressAndHoldEnabled</key> | |
<false/> | |
<key>AppleScrollAnimationEnabled</key> | |
<integer>0</integer> |
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
exports.handler = async (event) => { | |
const params = event.queryStringParameters; | |
const environment = params.environment; | |
let redirectionUrl; | |
switch(environment){ | |
case 'development': | |
url = "http://localhost:8080"; | |
break; |
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
exports.handler = async (event) => { | |
const response = { | |
statusCode: 302, | |
headers: { | |
"Location" : "https://example.com" | |
}, | |
body: null | |
}; | |
return response; | |
} |
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
assert.equal(await cryptoRun.challengeStatus(), 'ongoing') | |
await forceOracleStatus('accomplished') | |
await cryptoRun.refreshChallengeStatus() | |
await waitForOracleCallback() | |
assert.equal(await cryptoRun.challengeStatus(), 'accomplished') |
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
/* | |
* Helper to remotely update the test Oracle endpoint | |
*/ | |
async function forceOracleStatus(status) { | |
const util = require('util') | |
const exec = util.promisify(require('child_process').exec) | |
const awsCliCommand = 'aws lambda update-function-configuration --profile cryptizens-lambdas-deployer --function-name CryptoRunTest --environment Variables={status=' + status + '}' | |
const { stdout, stderr } = await exec(awsCliCommand) |
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 os, json | |
STATUS = os.environ['status'] | |
def lambda_handler(event, context): | |
response = { | |
"statusCode": 200, | |
"headers": { "Content-Type": "application/json" }, | |
"body": json.dumps( { "challenge_status": STATUS } ) |
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 CryptoRun = artifacts.require('./CryptoRun.sol') | |
contract('CryptoRun', function ([owner, beCode, donor1, donor2, hacker]) { | |
let cryptoRun | |
let cryptoRunAddress | |
beforeEach('setup contract and Oracle for each test', async function () { | |
cryptoRun = await CryptoRun.new(beCode) | |
cryptoRunAddress = await cryptoRun.address | |
await forceOracleStatus('ongoing') |
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
pragma solidity ^0.4.21; | |
contract BountyHunt { | |
// The hashed version of the secret to unlock the bounty | |
bytes32 public hashedSecret; | |
// The constructor function, called when we deploy the contract | |
function BountyHunt(bytes32 _hashedSecret) public { | |
hashedSecret = _hashedSecret; | |
} |
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
pragma solidity 0.4.21^; | |
contract FirstGenEthernityPod { | |
address public launcher; | |
int public podId; | |
bytes32 public firstName; | |
bytes32 public lastName; | |
bytes32 public pictureIPFSHash; | |
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
pragma solidity ^0.4.21; | |
contract InsuranceLedger { | |
// Event to broadcast to the network when a new motorbike has been added | |
event OnRecordMotorbike(bytes32 _hashedChassisNumber); | |
// The address of the contract owner (Seraphin), set when the contract is deployed | |
address public seraphinAddress = msg.sender; | |
// The mapping with all insured motorbikes - we stick to an extremely simple | |
// model representation with only the hashed chassis number. A given hashed |
NewerOlder