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 sys, os, json | |
from datetime import datetime | |
sys.path.append("modules") | |
import requests | |
############################ | |
### STRAVA API PARAMETERS ## | |
############################ | |
# The URL of the API, that we will query to get information on Thomas' activities. |
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; | |
// Import the Oraclize contract code so we can inherit from it | |
// Note that in our local test environment, we need to import the .sol file | |
// from the environment directly, whereas on the public nets we need to | |
// use the github version instead. | |
/* import "github.com/oraclize/ethereum-api/oraclizeAPI.sol"; */ | |
import "./usingOraclize.sol"; | |
contract CryptoRun is usingOraclize { |
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 | |
import json | |
from slacker import Slacker | |
# Flag for the GitHub Pull Request opened action | |
PULL_REQUEST_OPENED_EVENT = 'opened' | |
# Mapping from GitHub to Slack user ids, to be able to notify the Slack user corresponding to the GitHub Pull Request opener | |
GITHUB_TO_SLACK_USERS = { | |
'github_user_id_1': 'slack_user_id_1', |
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
// the callback function is called by Oraclize when the result is ready | |
// the oraclize_randomDS_proofVerify modifier prevents an invalid proof to execute this function code: | |
// the proof validity is fully verified on-chain | |
function __callback(bytes32 _queryId, string _result, bytes _proof) public { | |
require (msg.sender == oraclize_cbAddress()); | |
enteredCallback(_queryId); | |
address playerAddress = queriesMapping[_queryId]; | |
if (oraclize_randomDS_proofVerify__returnCode(_queryId, _result, _proof) != 0) { |
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
<div id="app"> | |
<label>{{ counter }}</label> | |
<button v-on:click="incrementCounter()">Add a tent!</button> | |
</div> | |
<script src="https://cdn.jsdelivr.net/npm/vue"></script> | |
<script type="text/javascript"> | |
vue = new Vue({ | |
el: "#app", |
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
// Declare the Solidity version we want to use for the compiler | |
pragma solidity ^0.4.19; | |
/* | |
CryptoPicker contract | |
*/ | |
// Ensure we import the required Oraclize logic for the querying | |
import "github.com/oraclize/ethereum-api/oraclizeAPI.sol"; |
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.19; | |
/// @title Memorial. | |
contract Memorial { | |
// Event to notify of a new memory that's been created | |
event NewMemory(uint memoryId, int lat, int lon, bytes32 timing, bytes32 story, address owner); | |
// Populated at contract creation | |
address public curator = msg.sender; |
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
curl http://localhost:14700 -X POST -H 'Content-Type: application/json' -d '{"command": "getNodeInfo"}' | json_pp |
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
systemctl daemon-reload && systemctl restart iota | |
systemctl status iota |
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
[Unit] | |
Description=IOTA node | |
After=network.target | |
[Service] | |
WorkingDirectory=/opt/iota |