Skip to content

LINUX COMMAND LINE SHOW PUBLIC IP

This is a simple command that you can run on your local linux box, which will show you the public ip of the machine. Very helpful when mining on ethermine

First open a Terminal

Type:
dig +short myip.opendns.com @resolver1.opendns.com

That’s it. Your public IP will now show

INSTALL NVIDIA DRIVERS, CUDA, TENSORFLOW AND ANACONDA ON UBUNTU 20.04

Quick note on how to install the packages. It is in no particular order, these are raw notes my from my temporary build

Install Ubuntu

Open a terminal
sudo bash
apt-get update
apt-get dist-upgrade
nvidia-smi


Pick the version you want to use
apt install nvidia-utils-510
reboot


Open a terminal
sudo bash
nvidia-smi
ubuntu-drivers autoinstall
apt-get install curl


Go to the Anaconda site and download the latest build. For me it was the one below
cd Downloads/
bash Anaconda3-2021.11-Linux-x86_64.sh
source ~/.bashrc
conda info
conda update conda
conda update anaconda
sudo apt install nvidia-cuda-toolkit
reboot


Open a terminal
sudo bash
anaconda-navigator


Open a new notebook
pip install –upgrade tensorflow
Press run


Open a new notebook
import tensorflow as tf
print(tf.version)


Tensorflow will show the version

ALFA DRIVER INSTALL FOR KALI 2202.1 ON RASPBERRY PI 4

Open a terminal

sudo apt-get update

sudo apt-get upgrade

ifconfig

Note your wireless adapters…if any are installed

lsusb

Note the USB devices on the pi. You will not see the ALFA wifi device

Next type

sudo apt-get install realtek-rtl88xxau-dkms

Drivers will install, this may take a few minutes.

Once it is done type the following

lsusb

You will now see the Realtek Adapter

ifconfig

You will now see your ALFA wireless card

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

SIMPLIFY3D DOES NOT START

This is a quick fix for those times when Simplify3D does not start. Even if you reinstall the application, it refuses to start.

Here is how you fix it

Open

C:/Users/%username%/AppData/Local/Simplify3D/S3D-Software

Delete the file named “savedState.factory”

Now Simplify3D will start

AUTOMATICALLY REFRESH A WEBPAGE

  • Articles

Here is the code, that you will want to add to the header of your website. It will automatically refresh the page for you at a predetermined time interval. This code works with static pages, and each CMS like drupal, wordpress, and others

<meta http-equiv="refresh" content="60">

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

PARROT OS – UNZIP FILES ALONG WITH ZIPPED FILES IN SUBFOLDERS

This is a quick how-to on unzipping files using Parrot Security OS

Open a terminal
Navigate to the directory where the zipped files are
Type
unzip -d filename.zip

If you have a Zipped file that contains sub folders with additional zipped files you can unzip everything by typing
for z in *.zip; do unzip “$z”; done

You’re welcome