sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt update
apt-cache policy docker-ce
sudo apt install docker-ce
sudo systemctl status docker
sudo usermod -aG docker ${USER}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
joker stream | |
curl -s --url "http://127.0.0.1:7782" --data "{\"userpass\":\"1d8b27b21efabcd96571cd56f91a40fb9aa4cc623d273c63bf9223dc6f8cd81f\",\"method\":\"streamerqadd\",\"data\":\"$hex2\",\"seqid\":$i}" | |
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Discord #developer channel | |
FROM ubuntu:16.04 | |
ENV BUILD_PACKAGES="build-essential pkg-config libcurl3-gnutls-dev libc6-dev libevent-dev m4 g++-multilib autoconf libtool ncurses-dev unzip git python zlib1g-dev curl wget bsdmainutils automake libboost-all-dev libssl-dev libprotobuf-dev protobuf-compiler libqt4-dev libqrencode-dev libdb++-dev" | |
RUN apt update && \ | |
apt install -y $BUILD_PACKAGES |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Setting up a table | |
############# | |
https://github.com/smk762/kmd_pulp/blob/master/Staked/dice/dice_table.sh#L176 | |
We can see here that to setup a table we use the `dicefund` command which gives us a `rawtransaction` to broadcast on the network at https://github.com/smk762/kmd_pulp/blob/master/Staked/dice/dice_table.sh#L180 | |
We go into a loop to check that the `dicefund` (table setup) transaction has been confirmed https://github.com/smk762/kmd_pulp/blob/master/Staked/dice/dice_table.sh#L191 | |
When confirmed, doing a `dicelist` gives us a list of tables https://github.com/smk762/kmd_pulp/blob/master/Staked/dice/dice_table.sh#L195 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://medium.com/@nickdenardis/working-with-vuepress-v0-10-and-tailwind-css-v0-6-f9a928fbae98 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-N BADMINER creates a new iptables chain called "BADMINER" | |
-A INPUT appends to the "INPUT" chain this rule, which searches for the string "authorize" on tcp/4646 and then jumps (-j) to the rules of chain BADMINER (-j BADMINER) | |
-A BADMINER has the rate limit of 10/min and logs to syslog | |
iptables -N BADMINER | |
iptables -A BADMINER -m limit --limit 10/min -j LOG --log-prefix "BADMINER DROP: " | |
iptables -A BADMINER -m comment --comment "Rate limit exceeded, reject" -j REJECT | |
iptables -A INPUT -i eth0 -p tcp -m tcp --dport 4646 -m string --string "authorize" --algo bm -m comment --comment "Catch BADMINER" -j BADMINER |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo fallocate -l 4G /swapfile | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
komodod -regtest -ac_name=REGTESTKMDICE -pubkey=03511aab41ccdef8586a79460765c1f260b6082a52772dfb80054ba17c74652f81 -ac_cc=2 -ac_supply=5000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo a2enmod proxy | |
sudo a2enmod proxy_http | |
sudo a2enmod proxy_balancer | |
sudo a2enmod lbmethod_byrequests | |
sudo systemctl restart apache2 | |
<VirtualHost *:443> | |
SSLEngine on | |
RequestHeader set X-Forwarded-Proto 'https' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker exec -it mediawiki /bin/bash | |
# Disable reading by anonymous users | |
$wgGroupPermissions['*']['read'] = false; | |
# Disable anonymous editing | |
$wgGroupPermissions['*']['edit'] = false; | |
# Prevent new user registrations except by sysops |