1
0
mirror of /repos/dotTiddlywiki.git synced 2025-12-30 07:31:33 +01:00
This commit is contained in:
Aiko Mastboom 2015-05-04 16:39:09 +02:00
parent 1e4512bd87
commit 92b2b010f6
7 changed files with 158 additions and 4 deletions

10
mywiki/tiddlers/Lego.tid Normal file
View File

@ -0,0 +1,10 @@
created: 20150502200430678
creator: user
modified: 20150502200511209
modifier: user
tags:
title: Lego
type: text/vnd.tiddlywiki
* http://brickset.com
* http://rebrickable.com

View File

@ -0,0 +1,11 @@
created: 20150504065101846
creator: user
modified: 20150504065347021
modifier: user
tags: docker [[raspberry pi]]
title: Raspberry PI / Docker
type: text/vnd.tiddlywiki
* http://blog.hypriot.com/post/hypriotos-back-again-with-docker-on-arm
* https://registry.hub.docker.com/repos/hypriot/
* http://jpmens.net/2013/09/01/installing-mosquitto-on-a-raspberry-pi/

View File

@ -1,8 +1,8 @@
created: 20150409090953390
creator: user
modified: 20150409091259374
modified: 20150504085343006
modifier: user
tags:
tags: [[raspberry pi]]
title: Raspberry PI
type: text/vnd.tiddlywiki

View File

@ -1,6 +1,6 @@
created: 20150317163014131
creator: user
modified: 20150323100606029
modified: 20150422120349906
modifier: user
tags:
title: bootstrap deploy2docker
@ -33,7 +33,7 @@ You now have an image that is able to run the correct version of ansible.
Start the ops_bootstrap image and make sure it has access to your certificates and cxp-ops folder.
```bash
docker run --rm -it -v ${DOCKER_CERT_PATH}:/certs -v $(pwd):/root/ops cxp-ops/ops_bootstrap bash
docker run -it -v ${DOCKER_CERT_PATH}:/certs -v $(pwd):/root/ops cxp-ops/ops_bootstrap bash
```
Running `docker ps` inside the container should work. (if you run into version problems the Dockerfile for the ops_bootstrap needs updating and the bootstrap begins again with the ''Build ops_bootstrap image'' step.

View File

@ -0,0 +1,10 @@
created: 20150422161940681
creator: user
modified: 20150422162015089
modifier: user
tags:
title: dns_sd.h
type: text/vnd.tiddlywiki
; error: dns_sd.h: No such file or directory
* http://stackoverflow.com/questions/19585117/error-dns-sd-h-no-such-file-or-directory

View File

@ -0,0 +1,10 @@
created: 20150414071133953
creator: user
modified: 20150414071230337
modifier: user
tags:
title: iPhoto
type: text/vnd.tiddlywiki
; How to delete photos from your iPhone
:* http://www.idownloadblog.com/2014/02/28/how-to-delete-photos-from-your-iphone/

View File

@ -0,0 +1,113 @@
created: 20150429212131561
creator: user
modified: 20150504142437959
modifier: user
tags:
title: mosquitto + Node-RED
type: text/vnd.tiddlywiki
* https://github.com/node-red/node-red-nodes/tree/master/io
```bash
su
dpkg-reconfigure tzdata
cd
curl http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key | apt-key add -
cd /etc/apt/sources.list.d/
curl -O http://repo.mosquitto.org/debian/mosquitto-repo.list
cd
apt-get update
apt-get install mosquitto mosquitto-clients
apt-get install build-essential sudo vim-tiny python python-dev python-pip
# python-rpi.gpio
pip install RPi.GPIO
apt-get install libicu-dev libavahi-compat-libdnssd-dev
curl -o /bin/nave https://raw.githubusercontent.com/isaacs/nave/master/nave.sh
chmod +x /bin/nave
useradd -m -s /bin/bash red
# useradd -m -d /data/red -s /bin/bash red
adduser red dialout
adduser red tty
visudo
red ALL=(ALL) NOPASSWD: /usr/bin/python
su red
cd
nave use 0.10.38
npm install -g node-red
npm install -g mongodb
npm install -g redis
npm install -g arduino-firmata
cd .node-red
npm install node-red-contrib-freeboard
npm install node-red-node-discovery
npm install node-red-node-snmp
cd
npm install -g pm2
pm2 start `which node-red` -- -v
#pm2 start ./node_modules/node-red/bin/node-red-pi --interpreter=bash -- --max-old-space-size=128 -v ./.node-red/flows_aiko.json
```
```json
{
"name": "red",
"version": "1.0.0",
"description": "quick red install",
"main": "./node_modules/node-red/red.js",
"author": "Aiko Mastboom",
"license": "MIT",
"dependencies": {
"node-red": "0.10.6",
"mongodb": "2.0.28",
"redis": "0.12.1",
"rpi-gpio": "0.5.1",
"arduino-firmata": "0.3.2",
"node-red-contrib-freeboard": "0.0.5",
"node-red-node-discovery": "0.0.6",
"node-red-node-snmp": "0.0.2"
}
}
```
```bash
/node_modules/node-red/nodes/core/hardware/nrgpio ver 0
0.5.11
mkdir -p /usr/share/doc
touch /usr/share/doc/python-rpi.gpio
vi node_modules/node-red/nodes/core/hardware/36-rpi-gpio.js
```
```diff
--- 36-rpi-gpio.js.orig 2015-05-04 12:48:42.242991732 +0000
+++ 36-rpi-gpio.js 2015-05-04 12:46:57.469316893 +0000
@@ -27,10 +27,10 @@
throw "Info : Ignoring Raspberry Pi specific node.";
}
- if (!fs.existsSync("/usr/share/doc/python-rpi.gpio")) {
- RED.log.warn("Can't find Pi RPi.GPIO python library.");
- throw "Warning : Can't find Pi RPi.GPIO python library.";
- }
+ //if (!fs.existsSync("/usr/share/doc/python-rpi.gpio")) {
+ // RED.log.warn("Can't find Pi RPi.GPIO python library.");
+ // throw "Warning : Can't find Pi RPi.GPIO python library.";
+ //}
if ( !(1 & parseInt ((fs.statSync(gpioCommand).mode & parseInt ("777", 8)).toString (8)[0]) )) {
RED.log.error(gpioCommand+" needs to be executable.");
```
```bash
docker run -i -t --cap-add=SYS_RAWIO --device /dev/ttyAMA0:/dev/ttyAMA0 --device /dev/ttyACM0:/dev/ttyACM0 --volume /dev/serial:/dev/serial --device /dev/mem:/dev/mem --add-host node1.aiko.sh:192.168.59.103 --add-host node2.aiko.sh:192.168.63.103 -p 1880:1880 aiko/node-red-pi bash
```