Skip to content

Instantly share code, notes, and snippets.

View thomasvds's full-sized avatar
🚀
SHIP OR DIE

Thomas Vanderstraeten thomasvds

🚀
SHIP OR DIE
View GitHub Profile
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.
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 {
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',
// 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) {
<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",
// 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";
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;
curl http://localhost:14700 -X POST -H 'Content-Type: application/json' -d '{"command": "getNodeInfo"}' | json_pp
systemctl daemon-reload && systemctl restart iota
systemctl status iota
[Unit]
Description=IOTA node
After=network.target
[Service]
WorkingDirectory=/opt/iota