host > stage > group > all > defaults
#!/bin/bash | |
# Initialize empty variables | |
CONTAINER="" | |
ERROR_KEYWORDS="" | |
# Parse arguments using flags | |
while [ "$1" != "" ]; do | |
case $1 in | |
-container ) shift |
# Add Docker's official GPG key: | |
sudo apt-get update | |
sudo apt-get install ca-certificates curl | |
sudo install -m 0755 -d /etc/apt/keyrings | |
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc | |
sudo chmod a+r /etc/apt/keyrings/docker.asc | |
# Add the repository to Apt sources: | |
echo \ | |
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ |
rpcuser=$1 | |
rpcpass=$2 | |
url=$3 #should be http://localhost:8332 for mainnet or http://localhost:38332 for signet | |
curl --user $rpcuser:$rpcpass --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockchaininfo", "params": []}' -H 'content-type: text/plain;' $URL |
# Install docker repo and setup docker on ubuntu / debian with `docker compose` plugin | |
sudo apt-get install ca-certificates curl | |
sudo install -m 0755 -d /etc/apt/keyrings | |
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc | |
sudo chmod a+r /etc/apt/keyrings/docker.asc | |
# Add the repository to Apt sources: | |
echo \ | |
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ | |
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ |
This is how you can use a config.d directory in your ssh config so that you will have versatility, portability, and customization of your ssh env and commands to connect to servers using simple shortcuts from VS Code and Terminal. Manage multiple identities, keys, servers, everything.
example: ssh prototype
or ssh user1@prototype
- Make sure you have a .ssh dir with permissions 755 for the dir
- Create an SSH key and give it permissions 600
- Make an ssh config file by typing
nano ~/.ssh/config
and put in the lineInclude config.d/*
hitcntrl + x
theny
when you're done editing - Create a config.d directory
mkdir ~/.ssh/config.d
- In there, you can add in ssh config files for various projects - for exmaple,
personal
orwork
- Let's create one for work
cd ~/.ssh/config.d && nano work
Steps to get eosio.wrap working:
Generated a JSON of all producers and their perms - alphabetized:
[
{
"actor": "amsterdam",
"permission": "active"
},
{
There are 2 parts - a filter and a jail config:
nginx-access-erriez.conf
[Definition]
#^<HOST> .*"\\x.*"$
failregex = ^<HOST>.*"CONNECT leakix.*"$
# ^<HOST>.*"HTTP.*"$
^<HOST>.*"MGLNDD.*"$
#!/bin/bash | |
# may need to specify a diff path to syslog if you want older log files | |
cat /var/log/syslog | grep kernel | rev | cut -d"]" -f1 | rev | awk '{ print $3, $4, $5, $8 }' | grep '^[0-9].*[a-zA-Z]' | perl -MData::Dumper -p -e 'BEGIN { $db = {}; } ($total_vm, $rss, $pgtables_bytes, $name) = split; $db->{$name}->{total_vm} += $total_vm; $db->{$name}->{rss} += $rss; $db->{$name}->{pgtables_bytes} += $pgtables_bytes; $_=undef; END { map { printf("%.1fG %s\n", ($db->{$_}->{rss} * 4096)/(1024*1024*1024), $_) } sort { $db->{$a}->{rss} <=> $db->{$b}->{rss} } keys %{$db}; }' | tail -n 10 | tac |
There is no torrent which would be faster than just using the Bitcoin network "hive" - which is huge. There may be a way to sync using local or low-latency nodes nearby, but any time you specify which nodes you sync from - it introduces risk.
Very good to have a fast CPU and lots of RAM, SSD is not as important as RAM.
With this command I was able to download the entire blockchain and create all indices in almost exactly 24 hours:
bitcoind --datadir=<path-to-external-ssd> -blockfilterindex=1 -txindex=1 -coinstatsindex=1 -dbcache=16384 -daemon
If you have 32GB of RAM, you can use 32768
for dbcache