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 request = require('request-promise') | |
const host = 'https://beta.braiven.io' | |
const base = 'ETH' | |
const alt = 'BVN' | |
const log = (json) => console.log(JSON.stringify(json, null, "\t")) | |
const login = async () => { |
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 express = require('express'); | |
const graphqlHTTP = require('express-graphql'); | |
const { MongoClient } = require('mongodb'); | |
const { | |
graphql, | |
GraphQLSchema, | |
GraphQLObjectType, | |
GraphQLString | |
} = require('graphql'); |
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
func (r *Router) convertToPatternSet(p interface{}) *PatternSet { | |
fields := structs.Fields(p) | |
ps := &PatternSet{} | |
ps.Fields = make(PatternFields) | |
ps.Pattern = p | |
ps.Weight = 0 | |
for _, field := range fields { | |
if !strings.HasSuffix(field.Name(), "_") && !field.IsZero() { |
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
parity --jsonrpc-interface all --ui-interface all --ui-no-validation --dapps-hosts all --chain kovan --ws-interface all --unsafe-expose & disown |
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
listening on 3210 | |
calling hemera with { traceId: '0f616dd8a5077b9e' } | |
[2018-02-22T16:11:51.209Z] DEBUG (hemera-bran-pc-e09d40077e17487bbd2dd6905e6e95a8/11868 on bran-pc): sendClientSend | |
plugin: "hemera-zipkin" | |
traceData: { | |
"traceId": "0f616dd8a5077b9e", | |
"spanId": "98a8fb154eb44934b5a7bcbe461e8a63", | |
"sampled": true | |
} | |
meta: { |
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
sudo groupadd docker | |
sudo usermod -aG docker $USER | |
docker build -t friendlyhello . ➜ build changes | |
docker run -p 4000:8080 friendlyhello ➜ run image in container to see changes | |
docker tag friendlyhello branie/get-started:part2 ➜ tag the image on docker.com | |
docker push branie/get-started:part2 ➜ push the image to docker.com | |
docker stack deploy -c docker-compose.yml getstartedlab ➜ start the swarm of containers that are load balanced | |
docker service ls ➜ view service task | |
docker service ps #service_name ➜ view containers inside a service |
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 seneca = require('seneca') | |
seneca() | |
// send matching actions out over the network | |
.client({ | |
host: "localhost", | |
type: 'tcp', | |
port: 10000, | |
pin: 'color:blue' | |
}) |
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
FROM node | |
RUN mkdir -p /usr/src/app | |
COPY index.js /usr/src/app | |
EXPOSE 8080 | |
CMD [ "node", "/usr/src/app/index" ] |
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
mod africas_talking { | |
#[derive(Debug)] | |
pub struct Sms { | |
sent_time: &'static str, | |
} | |
#[derive(Debug)] | |
pub struct Message { | |
pub to: &'static str, | |
pub content: &'static str, |
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
import express from 'express'; | |
import graphqlHTTP from 'express-graphql'; | |
import { buildSchema } from 'graphql'; | |
const router = express.Router(); | |
const schema = buildSchema(` | |
type Query { | |
hello: String | |
}`); |