Skip to content

Instantly share code, notes, and snippets.

View Dockerfile
FROM debian:stable-slim
RUN mkdir /app
WORKDIR /app
ENV TZ=Europe/Paris
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt update && apt install -y --no-install-recommends \
View river.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View thingy.md

gatttool

obtain mac with hcitool lescan (here FD:19:AF:BA:73:C0)

gatttool -b FD:19:AF:BA:73:C0 -t random --char-desc

spot the following lines (see source)

handle = 0x003f, uuid = ef680406-9b35-4933-9b10-52ffa9740042
handle = 0x0040, uuid = 00002902-0000-1000-8000-00805f9b34fb
@jdevoo
jdevoo / notes.md
Created Dec 21, 2018
Mainflux Demo
View notes.md

Mainflux Demo

intro

The Mainflux domain model is based around 3 entities: users, things and channels

user represents the real (human) user of the system

things represents devices and applications connected to Mainflux. There are two types of "things" supported at the moment: device and app. Device is used to represent any physical device connected to the platform. App represents any 3rd party service that uses the platform for message exchange with things.

channel represents a communication channel and serves as message topic that can be consumed by things connected to it

@jdevoo
jdevoo / log
Created Oct 3, 2018
result from docker logs -f peer1
View log
WARN [10-03|06:27:01.930] Sanitizing cache to Go's GC limits provided=1024 updated=660
DEBUG[10-03|06:27:01.931] Sanitizing Go's GC trigger percent=100
INFO [10-03|06:27:01.932] Maximum peer count ETH=25 LES=0 total=25
DEBUG[10-03|06:27:01.941] FS scan times list=3.531ms set=9.2µs diff=3.3µs
TRACE[10-03|06:27:01.948] Started watching keystore folder path=/root/.ethereum/keystore
TRACE[10-03|06:27:01.958] Handled keystore changes time=16.6058ms
INFO [10-03|06:27:02.004] Starting peer-to-peer node instance=Geth/peer1/v1.8.16-stable-477eb093/linux-amd64/go1.9.4
INFO [10-03|06:27:02.004] Allocated cache and file handles database=/root/.ethereum/geth/chaindata cache=495 handles=1024
INFO [10-03|06:27:02.241] Initialised chain configuration config="{ChainID: 11 Homestead: 0 DAO: <nil> DAOSupport: false EIP150: 0 EIP155: 0 EIP158: 0 Byzantium: 0 Constantinople: <nil> Engine: ethash}"
INFO [10-0
@jdevoo
jdevoo / Dockerfile
Created Jun 2, 2018
govim with exercism
View Dockerfile
FROM golang:latest
ARG EXERCISM_API_KEY
ADD templates/ /
# build and install vim
RUN apt-get update && apt-get install -y ncurses-dev ctags && cd /tmp && git clone https://github.com/vim/vim.git && cd vim && ./configure --with-features=huge --enable-gui=no --without-x --prefix=/usr && make VIMRUNTIMEDIR=/usr/share/vim/vim80 && make install
# install go tools
View docker-compose.yml
version: "2.0"
services:
sql:
image: kapua/kapua-sql
ports:
- 3306:3306
- 8181:8181
elasticsearch:
image: elasticsearch:5.4.0
ports:
View Dockerfile
FROM openjdk:8-jre-alpine
RUN apk update && apk add curl ca-certificates git subversion less nodejs-npm && npm install -g gulp-cli
WORKDIR /root
RUN npm install code-forensics
ENTRYPOINT ["gulp"]
View p2p.md

infrastructure

docker images installed

REPOSITORY           TAG                 IMAGE ID            CREATED             SIZE
ethereum/solc        stable              efe0ae340953        4 weeks ago         13.1MB
ethereum/client-go   alpine              314091749c85        5 weeks ago         40.3MB

init.bat

@echo off
View fetch.sh
#!/bin/bash
cat list | while read -r file url; do
post=$(basename "$file")
image=$(basename "$url")
outfile="${post%.*}.${image##*.}"
if [ -f ${outfile} ] ; then
count=$( find . -name "${post%.*}*" 2> /dev/null | wc -l )
outfile="${post%.*}-${count}.${image##*.}"
fi
wget ${url} -O ${outfile}