Skip to content

FIX TORSOCKS PERROR ISSUE

In ParrotOS if you install torsocks using apt-get install torsocks, it installs fine, however you cannot run it from the commandline as it has the following error

Error:
PERROR torsocks[2859]: socks5 libc connect: Connection refused (in socks5_connect() at socks5.c:202)

To fix this error do the following

Type:
sudo nano /etc/tor/torsocks.conf

Scroll down to the TorPort line

Change 9050 to 9150

Now it should read
TorPort 9150

Press CTRL + X
Press Y to save

Now you can run torsocks

How to use WGET with TOR through torsocks

Quick how-to on using wget for a .onion site

Once Parrot OS is installed

Open Applications menu at the top left of the screen

Open TOR Launcher

Click Install TOR

Open a terminal

sudo apt-get update

sudo apt-get upgrade

sudo apt-get install torsocks

Once installed, you can navigate to a terminal

Type:
torsocks wget to get the data through the tor network.

Example (change the links with valid ones):
torsocks wget
torsocks wget

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