-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnotes.txt
More file actions
224 lines (150 loc) · 7.4 KB
/
notes.txt
File metadata and controls
224 lines (150 loc) · 7.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
======================================================================================================================
GIT REPO URL
======================================================================================================================
https://RBEIBCInnovation@dev.azure.com/RBEIBCInnovation/RBEIBCInnovation/_git/DBTrainDemo
======================================================================================================================
GANACHE MNEMONIC
======================================================================================================================
between vacant meadow invest minute tenant mobile front spring hungry globe inspire
======================================================================================================================
GANACHE COMMANDS
======================================================================================================================
ganache-cli -d -l 999999999 -m "between vacant meadow invest minute tenant mobile front spring hungry globe inspire"
======================================================================================================================
GCLOUD IP
======================================================================================================================
IP Address: 35.246.152.112
======================================================================================================================
NPM INSTALLATION PREREQUISITES
======================================================================================================================
sudo apt install python
sudo apt install build-essential
======================================================================================================================
TMUX COMMANDS - TO RUN IN BACKGROUND
======================================================================================================================
https://hackernoon.com/a-gentle-introduction-to-tmux-8d784c404340
Start new named session:
tmux new -s [session name]
Detach from session:
ctrl+b d
List sessions:
tmux ls
Attach to named session:
tmux a -t [name of session]
Kill named session:
tmux kill-session -t [name of session]
Split panes horizontally:
ctrl+b "
Split panes vertically:
ctrl+b %
Kill current pane:
ctrl+b x
Move to another pane:
ctrl+b [arrow key]
Cycle through panes:
ctrl+b o
Cycle just between previous and current pane:
ctrl+b ;
Kill tmux server, along with all sessions:
tmux kill-server
---------
======================================================================================================================
Start Google chrome without security
======================================================================================================================
google-chrome --user-data-dir=/tmp --disable-web-security
======================================================================================================================
COUCH DB INSTALLATION ON RASPBERRY PI
======================================================================================================================
https://github.com/apache/couchdb/releases/tag/2.3.0
http://tplinkwifi.net/
https://andyfelong.com/2017/09/couchdb-2-1-on-raspberry-pi-raspbian-stretch/
cd /home/couchdb/etc
sudo -i -u couchdb /home/couchdb/bin/couchdb
START CouchDb:
sudo -i -u couchdb /home/couchdb/bin/couchdb
Issues:
1. After setting up couch db ensure that you go to settings and select "configure for single node". Else it will trow a write permission required and no documents will be written on the db
2. Keep the db port as 5000
https://www.dexterindustries.com/howto/run-a-program-on-your-raspberry-pi-at-startup/
sudo vim /lib/systemd/system/couchdb.service
[Unit]
Description=Couchdb service
After=network.target
[Service]
Type=simple
User=couchdb
ExecStart=/home/couchdb/bin/couchdb -o /dev/stdout -e /dev/stderr
Restart=always
sudo chmod 644 /lib/systemd/system/couchdb.service
sudo systemctl daemon-reload
sudo systemctl enable couchdb.service
OPERATIONS
sudo service couchdb start
sudo service couchdb stop
sudo service couchdb restart
sudo service couchdb status
======================================================================================================================
PYTHON AGENT INSTALLATION PRE REQUISITES
======================================================================================================================
Python3 Packages:
connexion
Flask-RESTful
requests
python_dateutil
setuptools
=====================================================================================================================
NODE JS INSTALLATION ON RASPBERRY PI
=====================================================================================================================
Node:
wget https://nodejs.org/dist/v10.16.0/node-v10.16.0-linux-armv7l.tar.xz
tar -xvf node-v10.16.0-linux-armv7l.tar.xz
cd node-v10.16.0-linux-armv7l/
sudo cp -R * /usr/local/
ARM Info:
cat /proc/cpuinfo
=====================================================================================================================
GANACHE AND TRUFFLE INSTALLATION
=====================================================================================================================
Ganache & Truffle:
sudo npm i -g ganache-cli
sudo npm i -g truffle
=====================================================================================================================
GOOGLE CHROME REMOTE DEBUG
=====================================================================================================================
chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=192.168.1.50:9229/bed1b6fc-84ac-4c30-ac15-f6e5a05e9a30
pi@pi1:~/DBTrainDemo $ node --inspect-brk=0.0.0.0:9229 index.js
Debugger listening on ws://0.0.0.0:9229/bed1b6fc-84ac-4c30-ac15-f6e5a05e9a30
For help, see: https://nodejs.org/en/docs/inspector
=====================================================================================================================
MISCELLANEOUS INFORMATION
=====================================================================================================================
Collabedit: mcqp6
efff67xbdwjxoesuwoy4kw5kb6ja6hlisqrjkcaau7ldgxppuvxa
curl -X POST \
http://localhost:8100/v1/requestBid \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Postman-Token: d392c5f6-2c7c-4359-9126-3fd03acb3d71' \
-H 'cache-control: no-cache' \
-d '{
"auctionId" : "AUC9876"
}'
=====================================================================================================================
GETH COMMANDS
=====================================================================================================================
geth --datadir .ethereum/ account new
Address: {d9329b089532fb30d50364729841d2213d2153cd}
Address: {0b8a3c08a5cfae97d9304a9bdaad6a6db78a3d72}
Password: password
network name : db
locking : d9329b089532fb30d50364729841d2213d2153cd
prefunded : d9329b089532fb30d50364729841d2213d2153cd
------------------------
Initialize ledger
------------------------
geth --datadir .ethereum/ init genesis.json
-----------------
START GETH
-----------------
geth --nodiscover --networkid 1 --datadir .ethereum/ --unlock d9329b089532fb30d50364729841d2213d2153cd --mine --rpc --rpcapi eth,net,web3
geth --nodiscover --networkid 1 --datadir .ethereum/ --unlock d9329b089532fb30d50364729841d2213d2153cd --mine --rpc --rpcapi eth,net,web3 --verbosity 2