Archive for the ‘Uncategorized’ Category

Reinstall the same apt packages after reinstall or on a new system

To save a list of installed apt packages on your Ubuntu system so you can reinstall them on another Ubuntu system, you can use the dpkg and apt commands to generate a package list and then transfer that list to the new system. Here are the steps:

  1. On the source Ubuntu system (the one with the packages you want to save), open a terminal.
  2. Run the following command to generate a list of installed packages and save it to a text file (e.g., package_list.txt):

bashCopy code

dpkg --get-selections > package_list.txt

This command will create a text file called package_list.txt in the current directory containing a list of all installed packages.

  1. Transfer the package_list.txt file to the target Ubuntu system. You can use methods like SCP, USB drive, or any other means to move the file to the new system.
  2. On the target Ubuntu system, open a terminal.
  3. Place the package_list.txt file in a directory of your choice.
  4. Run the following command to install the packages listed in the file:

sudo dpkg --set-selections < package_list.txt
sudo apt-get -y update
sudo apt-get dselect-upgrade

These commands will set the selections of packages based on the contents of the package_list.txt file and then update and upgrade your system to install those packages.

Please note that while this method will install the same packages on the new system, it won’t configure them in the same way as your original system. Configuration files for packages are typically not included in this process, so you may need to manually configure any software that requires it after the installation.

Additionally, if the two systems have different versions of Ubuntu or different package sources enabled, there may be some compatibility issues or differences in available packages. Always exercise caution and review the package list before proceeding to ensure that the packages are appropriate for the target system.

The Beginner’s Guide to the Neuro-biology of Drug Use

My reputation notwithstanding, I have rarely taken a substance that I haven’t researched. It’s hard to keep track of them (serotonin? dopamine? what?) and I was about to make a spreadsheet. Pro tip: if you think you need to do something like that, the odds approach certainty that someone else has already done the work.

A long rant about my drug use on discord

You are required to login to view this page.

10 ChatGPT alternative interfaces

Here are 10 examples of websites that let you interact with ChatGPT using shortcuts and buttons:

  1. Cleverbot – https://www.cleverbot.com/
  2. Replika – https://replika.ai/
  3. Mitsuku – https://www.pandorabots.com/mitsuku/
  4. Rose – https://rose.bot/
  5. OpenAI Playground – https://beta.openai.com/playground/
  6. Zo – https://zo.ai/
  7. AI Dungeon – https://play.aidungeon.io/
  8. Hugging Face – https://huggingface.co/convai/
  9. Meena – https://meena.ml/
  10. Drift – https://www.drift.com/

These websites offer various levels of interaction and customization with ChatGPT, including the ability to use pre-written prompts and shortcuts to engage with the AI.

SSH to a Juniper Switch without a password

User

explain how i would use ssh without password to a juniper switch

ChatGPT

To use SSH without a password to connect to a Juniper switch, you will need to set up public key authentication. Here’s how to do it:

  1. Generate a public/private key pair on the client machine that you want to use to connect to the Juniper switch. You can use the ssh-keygen command to do this. Make sure to save the key pair in the default location (~/.ssh/id_rsa).
  2. Copy the public key to the Juniper switch. You can do this using the ssh-copy-id command, which will copy the public key to the ~/.ssh/authorized_keys file on the Juniper switch. Alternatively, you can manually copy the public key to the authorized_keys file using a text editor.
  3. Configure the Juniper switch to allow public key authentication. To do this, you will need to edit the sshd configuration file (usually located at /etc/ssh/sshd_config) and set the PubkeyAuthentication option to yes.
  4. Restart the sshd service on the Juniper switch. This will apply the changes you made to the sshd configuration file.
  5. Test the connection. From the client machine, use the ssh command to connect to the Juniper switch using the private key file you generated in step 1. If everything has been set up correctly, you should be able to connect to the Juniper switch without being prompted for a password.

Note: The exact steps for setting up public key authentication and configuring the sshd service may vary depending on the version of Junos OS that is running on the Juniper switch. Consult the Juniper documentation for more detailed instructions.

Raspberry Pi 4 Boot From USB SSD

Up til now, to boot a raspberry pi from SSD, you had to still boot from the slow SD card, with a small hack in the /boot directory. Now there are instructions to boot directly from the SSD. 

Doing this today to my RPi 4 / 4G with 500Mb SSD for my assistant (eventually talking glowing skull

Source: Raspberry Pi 4 Boot From USB – tynick.com | AWS, Linux, Raspberry Pi, and Home Automation

My configuration is a little bit different from his, I have Seeed’s X825 and X735 power management and SATA / USB drive adapter, all stuffed into a case. The tricky part of this was that to mount the hard drive on another system to flash it, you have to take it all apart to get the drive. The directions are not completely explicit, so I’ll spell it out:

If you have to take the whole thing apart, flash the SD and the SSD at the same time, put it all back together except for the part where you connect the USB ports between the drive and the Pi, Flash the EEprom as directed so it’ll change the boot order to SD > SSD . 

So when you boot from the SD card, it’s painfully slow if yo;u’ve gotten used to running your Pi from a normal recycled  laptop hard drive or even better a SSD. 

 

When you do the rpi-update command you get this scary-ish message:

pi@raspberrypi:~ $ sudo rpi-update 
*** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
*** Performing self-update
*** Relaunching after update
*** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
*** We're running for the first time
*** Backing up files (this will take a few minutes)
*** Backing up firmware
*** Backing up modules 4.19.97-v7l+
#############################################################
WARNING: This update bumps to rpi-5.4.y linux tree
See: https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=269769

'rpi-update' should only be used if there is a specific
reason to do so - for example, a request by a Raspberry Pi
engineer or if you want to help the testing effort
and are comfortable with restoring if there are regressions.

DO NOT use 'rpi-update' as part of a regular update process.

########################################################
Would you like to proceed? (y/N)
*** Downloading specific firmware revision (this will take a few minutes)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 168 100 168 0 0 1024 0 --:--:-- --:--:-- --:--:-- 1030
100 115M 100 115M 0 0 419k 0 0:04:41 0:04:41 --:--:-- 607k
*** Updating firmware
*** Updating kernel modules


this follows with a long ish download and update

What it takes…

I’ve been trying to get a new job but it’s been a little daunting. Today I am starting something new. After watching a video that basically says you just need to have *something* out there that people can see, maybe with some videos talking about your process.

So today I deployed my first “hello world” type app to AWS just using the demo code. I have two projects I’m thinking of making for this:
1. Backgammon – I partially built a backgammon game in Javascript that was going to use a PHP backend.  https://github.com/rcanzlovar/backg

2. MyCalNotify – a simple webapp I wrote that accesses google calendar info in interesting ways and can also add events to the calendar. Currently in development with provisional approval from Google.

So yeah, I’ll be posting progress here.

https://github.com/rcanzlovar/myamplifyapp/

booking

Test of booking

[bookly-form]

whasup

500 words

i need 500 words a day about.. something.

i have many stubs of essays that pop through my mind from time to time. i used to like to journal, especially back in the day when I did it by hand. Doing it by keyboard has always been a little tricky, especially with regard to keeping track of it later.

I’ve been looking at the data that you can get Facebook to give you “your data” in the form of either a bunch of HTML files and jpgs or a bunch of JSON data along with pictures. The reason is that Soltahr wants to have a book based on her writings around the year, and it occurred to me that if i took all that she wrote on January 1 of all years and clumped it together, and then all she ever wrote on January 2, etc. It could be a half decent bad first draft of such a book.

so I have a book too. not sure what it’s aboout but recently i had the idea that something centered on my obsession with lines and state transtions. Other kinds of pedantry.

My apps before resetting my phone

Return top

Geek

I've seen things. Now I'm gonna write about them.