To install a custom package or modify an existing docker image we need to
- run a docker a container from the image we wish to modify
- modify the docker container
- commit the changes to the container as a docker image
- test changes made to image
To install a custom package or modify an existing docker image we need to
pm list packages -f |
# Elasticsearch Cheatsheet - an overview of commonly used Elasticsearch API commands | |
# cat paths | |
/_cat/allocation | |
/_cat/shards | |
/_cat/shards/{index} | |
/_cat/master | |
/_cat/nodes | |
/_cat/indices | |
/_cat/indices/{index} |
# Initialize the scroll | |
page = es.search( | |
index = 'yourIndex', | |
doc_type = 'yourType', | |
scroll = '2m', | |
search_type = 'scan', | |
size = 1000, | |
body = { | |
# Your query's body | |
}) |
Thumbnail sketch: Two-factor (Yubikey or Google Authenticator) protected wallets
Hardware:
Computer. Shared-secret authenticator (Yubikey/Google Authenticator/etc). Server (possibly shared with millions of other users).
Motivating use case setup:
User creates a split (2-of-2 multisig) wallet on the computer and server. Keys must be securely backed up to protect against loss. GUI to be determined, but there will be some type of "Use Authenticator" checkbox specified at setup.
This describes how I installed and configured my Raspberry Pi model B (512MB).
The Pi is mainly used as SSH jump host, IRC client, Git server, backup fileserver, etc. It doesn't need stellar performance, it just has to be cheap, low in power usage, and secure.
#!/bin/bash | |
################################################################### | |
# Script for check new version of Element from github | |
# and download new version, if update is avaiable | |
# | |
# https://gist.github.com/MurzNN/ee64f98ab2e71b886c41d55594e5dd9e | |
# | |
################################################################### |
{ | |
"files": [ | |
{ | |
"path": "/usr/sbin/openwisp-monitoring", | |
"mode": "0744", | |
"contents": "uuid=$(uci get openwisp.http.uuid)\nkey=$(uci get openwisp.http.key)\nbase_url=$(uci get openwisp.http.url)\nverify_ssl=$(uci get openwisp.http.verify_ssl)\nincluded_interfaces=$(uci get openwisp.monitoring.included_interfaces)\nurl=\"$base_url/api/v1/monitoring/device/$uuid/?key=$key\"\ndata=$(/usr/sbin/netjson-monitoring \"$included_interfaces\")\nif [ \"$verify_ssl\" = 0 ]; then\n curl_command='curl -k'\nelse\n curl_command='curl'\nfi\n# send data via POST\n$curl_command -H \"Content-Type: application/json\" \\\n -X POST \\\n -d \"$data\" \\\n -v $url\n" | |
}, | |
{ | |
"path": "/usr/sbin/netjson-monitoring", | |
"mode": "0744", |