Skip to content
Home » Ubuntu » Page 3

Ubuntu

Ubuntu Linux Technology, Related Information, How-To’s, Tips, Tools, and Guides

FIX MONGODB GPG ERROR ON UBUNTU

From time to time you will need to update your Mongo pgp key so you can run normal updates. Below is the procedure

When running
sudo apt-get update

You will receive an error such as this when the pgp keys for Mongo are out of date
W: GPG error: . and so on
E: The repository ‘https://repo.mongodb.org/apt/……..’ is not signed

To fix this run the following:
wget -qO – https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add –

You will want to change the 5.0 above to the version listed in the error like this:
wget -qO – https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add –

Press Enter
Mongo will get the new keys

Now you can run
sudo apt-get update
and you will not receive the errors

SCRAPE HISTORICAL FINRA SHORT DATA

To quickly get all the data from this page and all the sub pages:

You will need to run the following on a UBUNTU box

Open a terminal

mkdir finra-historical && mkdir all-years && mkdir downloads && cd finra-historical/downloads

wget -r -np -c -H https://www.finra.org/filing-reporting/trf/trf-regulation-sho-2020

after the scrape completes type

mv regsho.finra.org ../allyears

cd ../

rm -R downloads

This will move only the downloads you want, over to the directory called all-years, and it will delete all the data that is extra

SCRAPE DAILY SHORT DATA FROM FINRA

Here is a quick how-to on getting the daily short data. From this I look to see if the short volume has increased or decreased on a particular stock by leveraging a Power BI Dashboard that I had created. This guide is to show the simple command I run to initially scrape all the data

From a Linux box

Open a terminal

Type:
mkdir FINRA
cd FINRA
wget -r -np http://regsho.finra.org/regsho-Index.html

After it downloads the data I run
rm *.html

To remove the additional files that are not relevant, and then I move the data to where I need it

ERROR: Can’t start miner, cuda exception in [check_if_cuda_really_exists, 248], invalid argument

I just rebooted my miner, had not run any updates, had not run anything, just rebooted my miner, tried turning t-rex back on, and received the following error: ERROR: Can’t start miner, cuda exception in [check_if_cuda_really_exists, 248], invalid argument

To fix this I had to perform the following
Login to the miner
Type:
sudo bash
apt-get update
apt-get upgrade
y
ubuntu-drivers devices
Check to see if the 450 driver is available:

vendor : NVIDIA Corporation
model : GP102 [GeForce GTX 1080 Ti]
driver : nvidia-driver-390 – distro non-free
driver : nvidia-driver-460-server – distro non-free
driver : nvidia-driver-450-server – distro non-free
driver : nvidia-driver-460 – distro non-free recommended
driver : nvidia-driver-418-server – distro non-free
driver : nvidia-driver-450 – distro non-free
driver : xserver-xorg-video-nouveau – distro free builtin

Now run the following command
apt purge nvidia-driver-460-server
y
apt install nvidia-driver-450-server
y
reboot

Once your miner comes back online, you can now run t-rex fine.

The hardware that I used in this guide:
Gigabyte AORUS GeForce GTX 1080 Ti (QTY 6):
https://amzn.to/2JqvXC8

Motherboard (QTY 1): 
https://amzn.to/2JqGJZ7

CPU (QTY 1): 
https://amzn.to/3qevp2X

Memory (QTY 1): 
https://amzn.to/2JqHn8Z

Hard Drive (QTY 1):  
https://amzn.to/3lic3X5

Risers (QTY 6):  
https://amzn.to/33rIgVE

Power Supplies (QTY 2):
https://amzn.to/3fTRpLR

Add2PSU (QTY 1):
https://amzn.to/39s4URY

Power Switch (QTY 1):  
https://amzn.to/3ljmNVk

INSTALL MONGODB ON RASPBERRY PI 4

By far the best guide I have found, in starting this journey, was written by Mark Smith on https://developer.mongodb.com/how-to/mongodb-on-raspberry-pi/

If you want to see why things work the way they do, please visit his guide. My guide below is just the commands, and how I am connecting into the database once it is setup.

To begin, first you will want to install Ubuntu Server 20.10 as described here:
https://tacticalware.com/install-ubuntu-server-20-10-64-bit-on-raspberry-pi-4-using-a-m-2-drive/

Once you are up and running, ssh into the Raspberry Pi
Login

From the terminal run the following:
sudo bash

wget -qO – https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add –

echo “deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse” | tee /etc/apt/sources.list.d/mongodb-org-4.4.list

apt-get update

apt-get install -y mongodb-org

systemctl daemon-reload

systemctl enable mongod

systemctl start mongod

systemctl status mongod

CTRL button +c to exit

mongo
use admin

db.createUser( { user: "admin",
 
        pwd: "SuperSecretPassword",

        roles: [ "userAdminAnyDatabase",

                 "dbAdminAnyDatabase",

                 "readWriteAnyDatabase"] } )

exit

nano /etc/mongod.conf

Add these lines to the end of the file

security:

   authorization: enabled

CTRL +x to Exit
Y to Save

systemctl restart mongod

mongo

db.adminCommand({listDatabases: 1})

Make sure you had no errors

exit

mongo -u “admin” -p

Enter your admin password for mongo, aks your SuperSecretPassword

Type
db.adminCommand({listDatabases: 1})
This will list out your databases and ensure you created it properly

exit

nano /etc/mongod.conf
and Change the bind ip from 127.0.0.1 to 0.0.0.0

net:
   port: 27017
   bindIp: 0.0.0.0

CTRL +x to Exit
Y to Save

systemctl restart mongod

ufw allow 27017/tcp

MongoDB is now successfully setup and running. On to configuring the Windows 10 system

To connect to the MongoDB from a Windows 10 computer

Open an Internet Browser on your Windows 10 computer
Navigate to https://robomongo.org/
Download the Robomongo Robo 3T Client
Once you install it, add these settings to connect to your system
Click Create
Connection Tab
Type – Direct Connection
Address – The IP of your Raspberry Pi
Port 27017
Authentication Tab
Check mark Perform Authentication
Database is admin
User Name is admin
Password is your SuperSecretPassword
Auth is SCRAM
Click Save
Click Connect

You are now connected and ready to run with your MongoDB environment

Hardware that I used:
Raspberry Pi 4 (4gb)
https://amzn.to/3q551IO

CanaKit 3.5A Raspberry Pi 4 Power Supply (USB-C)
https://amzn.to/3fNTYPu

CanaKit Raspberry Pi 4 Micro HDMI Cable – 6 Feet
https://amzn.to/33u5hr9

Western Digital 500GB WD_Black SN750 NVMe
https://amzn.to/3nZ5pH4

Plugable USB C to M.2 NVMe Tool-free Enclosure
https://amzn.to/3lflV3L

ACCESSING .ONION SITES WITHOUT TOR

While TOR is the recommended way to access the dark web, everyone and anyone can still visit without the same level of anonymity. I certainly would suggest using TOR always, however if you need to get to any .onion site from a computer without tor, you can do so by following this:

Open an internet browser (Edge, Firefox, Chrome, etc)
Type in the .onion site (ex. https://protonirockerxow.onion/rc/)
After the .onion portion of the address, add .dog (ex https://protonirockerxow.onion.dog/rc/)
Press Enter
You are now viewing RISEUP’s website on the darkweb, using a regular browser


DISABLE LIGHTS ON GIGABYTE MOTHERBOARDS

Most of my systems are built on linux, and linux does not have the ability to install the RGB Fusion software. For me to disable the lights on the motherboard, I have to do that from the BIOS. Here are the steps I use on my Gigabyte Motherboards:

Boot the computer
Press DEL during the boot to enter the BIOS
Scroll over to the Peripherals tab
Select RGB Fusion
Click OFF
Save & Exit
Reboot and your lights are off

Thanks for reading!