Install the Latest Node.js
sudo apt install nodejs
sudo apt install npm
sudo npm install n -g
For the latest stable version of Node JS:
sudo n stable
node --version
sudo apt install nodejs
sudo apt install npm
sudo npm install n -g
For the latest stable version of Node JS:
sudo n stable
node --version
sudo apt install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev
To install dependencies.
What the following does: download source code, unpack it, make directory ~/.localpython
to install into, run the configuration file setting install going to install folder, compile, install compilation, create a virtualenv pointing to the install, switch to the virtualenv to use it:
mkdir ~/src
cd ~/src
$ wget http://www.python.org/ftp/python/3.11.0/Python-3.11.0.tgz
$ tar -zxvf Python-3.11.0.tgz
$ cd Python-3.11.0
$ mkdir ~/localpython3110
$ ./configure --prefix=$HOME/localpython3110 --enable-optimizations
https://realpython.com/installing-python/#how-to-build-python-from-source-code
$ make &&
make altinstall
$ ~/localpython3110/bin/python3.11 -m venv py3110_venv
$ source py3110_venv/bin/activate
$ sudo apt install python3-pip -y
$ pip install --upgrade pip
$ pip install tk pillow numpy astropy astroplan pandas pytz matplotlib scikit-learn
$ pip list
$ pip -V
$ which python
$ pip install --upgrade pip
$ pip freeze --local > requirements.txt
$ deactivate
$ rm -rf somename_env
$ pip install -r requirements.txt
Note the venv folder stores neither the Python installation nor your code for your project. It is only used to store version information about the Python installation used for your project.
I ran into a not-so-obscure reason to use virtualenv instead of venv. If you ever want to serve a Flask app using Apache or some other production server, virtualenv creates a file called activate_this
, which Apache can use to run the Flask app in the appropriate Python environment.
sudo apt install python3-pip -y
pip install virtualenv
python3 -m virtualenv py31012_virtualenv
source py31012_virtualenv/bin/activate
pip install --upgrade pip
pip download package1 package2 -d'~/src/python-packages'
pip install package1 package2 -f ~/src/python-packages --no-index
To see the path to the current python installation:
python -c 'import os, sys; print(os.path.dirname(sys.executable))'
To see the path variable in Windows (readable format):
PS > $env:path -split ';'
To login to a linux machine remotely:
ssh username@ipaddress
To see the version of Linux running:
cat /etc/os-release
printenv
lists all environment variables
Print working directory:
pwd
Get IP address:
ifconfig
or ifconfig | grep inet
See what ports are open:
netstat
List all users:
less /etc/passwd
List groups a user belongs to:
groups username
or id username
List groups with their members:
getent group
or getent group | grep searchsomething
To get the status, including rules being enforced, of the uncomplicated firewall:
sudo ufw status
To list all processes currently running;
ps aux | grep searchsomething
To find a particular file or directory from among all files:
sudo find / -name "searchsomething"
or for directory name search only:
sudo find / -type d -name "searchsomething"
To search for specific text within the files within the current directory:
grep -nr 'searchsomething*'
$VARIABLE_NAME
is a variableapt
combines apt-get
and apt-cache
and it is newer. Use apt
.sudo apt update && sudo apt upgrade -y
script savedcommands.txt
.sh
file is an executable shell script. # to comment within./
is used to specify the current working directory especially when running something that could be the same as a system command.$PATH
, echo "${PATH//:/$'\n'}"
or just echo $PATH
$PATH
for the current session, export PATH='/new/directory:$PATH'
>
sends command output to a file. >>
appends the output to a file without overwriting existing contents.ls -al
shows all files in directory including hiddenwhatis
is a brief explanationman
gives a manualless
is like cat, but one page at a timeAt this point, you are using Linux. Either Raspberry Pi OS or Ubuntu are “flavors” of Linux. Having a list of basic commands is helpful:
sudo ufw allow OpenSSH
sudo ufw allow 22
sudo ufw allow 3306
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow ssh
sudo ufw allow http
or sudo ufw allow 80
sudo ufw allow https
or sudo ufw allow 443
sudo ufw allow 'apache full'
sudo ufw show added
sudo ufw enable
This step appears complex and does not appear necessary especially this early in the process. Strictly speaking, it is indeed not necessary. You could skip this step and do everything as the root or default user that already exists. However, it is best to do this now because:
sudo adduser new_username
usermod -aG sudo new_username
Change the password for the current user as desired with:
passwd
Grant all privileges to the user with the command
sudo visudo
and add a line in the /etc/sudoers file below the root user line: new_username ALL=(ALL:ALL)ALL
This only allows the user to give itself privileges. The user does not have all read/write privileges like the root itself. Log in as the new user through SSH.
This sounds convoluted and it is when you are accustomed to dealing with desktop computers designed for convenience. Linux is designed for security.
Make a new group
sudo addgroup servermanager
and add the new user to the group
sudo adduser new_username servermanager
groups new_username
make the new group the owner of the required directories:
sudo chown -vR :servermanager /var/www/
sudo chown -vR :servermanager /etc/apache2/sites-available/
sudo chown -vR :servermanager /etc/apache2/sites-enabled
then modify the directory permission to be written by the owner group:
sudo chmod -vR g+w /var/www/
(add +x if you want to be able to develop in this directory)
sudo chmod -vR g+w /etc/apache2/sites-available
sudo chmod -vR g+w /etc/apache2/sites-enabled
Linux has a group and user structure to manage permissions and it is very useful to be able to view the current state:
List all users in the system:
cat /etc/passwd
List all groups on the system:
cat etc/group
or less etc/group
or
getent group
for all members of a single group:
getent group group_name
check ownership of a directory, for example:
ls -ld /var/www/
check ownership of a file:
ls -l /var/www/
Find all the files owned by a particular user (may take some time):
sudo find / -user username
Change the active group for the session, possibly not:
newgrp servermanager
delete a group:
sudo groupdel group_name
delete a user (-r removes the user’s directory and mail spool):
sudo userdel -r username
search “linux octal permissions” to understand the numbering system.
Show all currently logged in users on a system:
w
Disclaimer: I did this with a Sony a7iii, which is mirrorless, no direct sun to my eyes and I had the screen pointed up so I didn’t look at the sun.
I wanted to put some numbers to this question, so I put on an ND8 filter (3 stops) and shot at 70mm, F36, ISO100. I took a picture of the bright sky next to the sun without direct sun as a baseline for “the brightest thing a camera is really designed to see.” Then I spot-metered directly on the afternoon sun in the center of the photo. The auto-shutter speed increased from 1/30 to 1/8000, so ~256x increase, or 8 stops. The sun was reasonably visible in the photo, but still bright (of course everything around it is black in the photo). I would say it was somewhat close to “properly exposed,” whatever that means in this case. 256x as bright as the bright sky is BRIGHT.
Notice the sun itself is still white.
I think there is not a good answer to “will direct sun damage my sensor?” because the best solution is to NOT have direct sun in the photo. 256x as bright as the bright sky seems like enough to damage the sensor, at least a few pixels, and it just doesn’t make for a good photo anyway – except sunrise or sunset of course with the beautiful filtering of the atmosphere.
For time lapses, I am going to start using interesting shadows to show sun movement instead of trying to figure out how to include the sun itself.
I don’t think the focal length actually matters much because the focal length just makes the sun bigger, not brighter per pixel. It only takes a few burned pixels for the sensor to be ruined so even if the sun is small – as it is with a wide-angle lens – the sun could damage some pixels if the aperture is too wide and/or not enough filter.
Bottom line, I think what actually matters for damage is:
That picture was taken at 0230 EDT.
Some great reading about timekeeping in the Industrial Revolution. Here are some examples:
The Clocks are Telling Lies by Scott Alan Johnston. Centers around the International Meridian Conference. Talks a lot about the distinction between scientific professionals’ and amateurs’ perception of timekeeping.
Time, Work-Discipline, and Industrial Capitalism by E. P. Thompson. Discusses the transition from natural time to using clocks to regulate labor.
Greenwich Time and the Longitude by Derek Howse. Recommended by Bjorn Kartomten.
Download the episode 1 mp3 here.
On your phone, long-click then select “download mp3 file” or “download link” to download to your phone and listen with any mp3 player including Spotify for example.
It is a simple mp3 file. Recommend using the VLC Media Player app to listen to the mp3 on your phone. With VLC media player you can “long-touch” the rewind button to rewind 20 seconds if you miss something, which I use a lot when listening to podcasts.
On computer, right-click to download.
Delaware resident and host Nathan Ruffing interviews City Councilman Drew Farrell for the very first episode. We talk Delaware City Council issues, podcasting in general, decide Drew is also a host not just a guest in the future, work out the nerves a little bit, and solicit suggestions for where the podcast should go next. One thing is certain: there should be a Delaware Ohio Podcast. The question is, “Where should the podcast go next?”
Let us know with the form on the podcast main page here:
I saw 6.9 acres listed “near the Intel plant” for $5.5M and the listing basically said, “go ahead and bull-doze our house,” so I decided to investigate this thing.
The main Intel parcel where the initial buildings are planned / being built is Licking County 095-111846-00.000, click here for the Licking County auditor’s website information. The site is a ~500-acre parcel to the southwest of the intersection of Mink Street and Green Chapel Road. To get there by car, the nearest landmark you can easily navigate to currently is Kyber Run Golf Course. The Intel plant site is a 7.5 mile drive northeast from New Albany.
According to some articles, the City of New Albany will annex the plant, which sounds right because it seems like Les Wexner was involved in attracting Intel.
I believe these are some of the lucky folks who sold their farm to Intel. They got at least $13.4M I think, but hard to follow because multiple parcels got merged to put together 500 acres. The Heimerl’s still own ~75 acres across the street from the plant to the north and various other plots in the area.
Click here for Intel’s announcement.
There are various plots around the Intel plant owned by MBJ Holdings, LLC, which is explained in this WOSU article about the wetlands involved.
“MBJ Holdings LLC is a subsidiary of real estate developer New Albany Company, which was started by L Brands founder Les Wexner and Jack Kessler to develop New Albany. It submitted the application that was drafted by EHM&T engineers.”