Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Tuesday, August 2, 2022

Linux text editors

 Today I had a discussion with a colleague about text editors in Linux and which one is the best editor. I realized people don't know lots of text editors (I guess I also don't know about all of them). But here are a few (the ones installed on the machine I was working on):

1. VI



2. NANO


3. MCEDIT


Personally I prefer mcedit . It's part of the Midnight Commander package. It's very intuitive and you see on the bottom bar all the shortcuts in case you forgot one of them. 




Monday, June 13, 2022

Docker stuff I use

 In this post I will describe a few of the Docker stuff I currently use. May not work for everyone but it may help you get started.

First, if you have a dockerfile you need to build it. I often use intermediate images during the build process (for installing compiling tools). I also call these images stage=intermediate. A simple build script looks like this:

docker build --tag IMAGENAME .

docker rmi -f $(docker images -q --filter label=stage=intermediate)

After successfully building the image, you need to start it. Depending on the image you may need to map ports or data volumes. However, one thing I find useful is to also run docker ps after starting the Docker image. This helps me to check if it really started and didn't exit immediately for some reason. I also start the image with a -RUNNING added to the name. This helps me to better identify the existing images. A simple startup script looks like this:

docker run --name "IMAGENAME-running" -d -p 80:80 IMAGENAME

docker ps

Finally, at some point you may wish to stop the running image. When I stop it, I also remove the -RUNNING image, like this:

docker stop IMAGENAME-running

docker rm IMAGENAME-running

In the unfortunate case of an unscheduled system reboot, you should first run the stop script. This will take care of removing the -RUNNING image and will enable you to start it again using the start script above.


A game jam

I recently (the last weekend) developed a game for a "game jam" hosted on ItchIO. For those new to this term, the "game jam...