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
const Web3 = require('web3'); | |
module.exports = { | |
networks: { | |
geth: { | |
provider: function () { | |
return new Web3.providers.HttpProvider('https://USERNAME:PASSWORD@HTTP_RPC_ENDPOINT') | |
}, | |
network_id: '*', | |
gasPrice: 0 | |
}, |
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
package kaleido.quorum; | |
import java.io.IOException; | |
import java.math.BigInteger; | |
import java.util.ArrayList; | |
import java.util.logging.Level; | |
import java.util.logging.Logger; | |
import org.web3j.protocol.Web3j; | |
import org.web3j.protocol.core.RemoteCall; |
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
resource "kaleido_environment" "myEnv" { | |
consortium_id = "${kaleido_consortium.mine.id}" | |
name = "My Environment" | |
description = "Deployed with Terraform" | |
env_type = "${element(var.env_types, 0)}" | |
consensus_type = "${element(var.quorum_consensus, 0)}" | |
} |
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
variable "quorum_consensus" { | |
type = "list" | |
default = ["raft", "ibft"] | |
description = "Consensus methods supported by quorum." | |
} |
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
/* | |
This creates suite of environments using all available | |
environment types and consensus methods. | |
*/ | |
variable "kaleido_api_key" { | |
type = "string" | |
description = "Kaleido API Key" | |
} |
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
#!/bin/bash | |
#https://docs.cloudfoundry.org/devguide/deploy-apps/ssh-apps.html#ssh-command | |
APP_NAME="my_app" | |
GUID=$(cf app $APP_NAME --guid) | |
INFO=$(cf curl /v2/info) | |
export CF_SSH_ENDPOINT=$(printf $INFO | jq '.app_ssh_endpoint' | cut -d ':' -f1 | tail -c +2) | |
export CF_SSH_PORT=$(printf $INFO | jq '.app_ssh_endpoint' | cut -d ':' -f2 | tr -d \") | |
export CF_SSH_FINGERPRINT=$(printf $INFO | jq '.app_ssh_host_key_fingerprint' | cut -d ':' -f1 | tail -c +2) |
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
info it worked if it ends with ok | |
1 verbose cli [ '/Users/fulton/.nvm/versions/node/v4.6.2/bin/node', | |
1 verbose cli '/Users/fulton/.nvm/versions/node/v4.6.2/bin/npm', | |
1 verbose cli 'install', | |
1 verbose cli 'slc', | |
1 verbose cli '-g' ] | |
2 info using [email protected] | |
3 info using [email protected] | |
4 silly loadCurrentTree Starting | |
5 silly install loadCurrentTree |
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
This one is useful af. Thanks @MHBauer and @bmangold | |
https://github.com/docker/docker/issues/18078 | |
docker commit $STOPPED_CONTAINER user/test_image | |
docker run -ti --entrypoint=sh user/test_imag |
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
var json = requestAsync('https://www.ibm.com') | |
.catch(recoverFromErrors) | |
.then(function(res) { | |
return JSON.parse(res.body); | |
}); | |
console.log(json); |
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
if (true) { | |
doThis(); | |
} else { | |
doThat(); | |
} |
NewerOlder